<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # WSGI Application Profiler This module provides a simple WSGI profiler middleware for findingbottlenecks in web application. It uses the [profile](http://docs.python.org/dev/library/profile.html#module-profile "(在 Python v3.5)") or[cProfile](http://docs.python.org/dev/library/profile.html#module-cProfile "(在 Python v3.5)") module to do the profiling and writes the stats to thestream provided (defaults to stderr). Example usage: ~~~ from werkzeug.contrib.profiler import ProfilerMiddleware app = ProfilerMiddleware(app) ~~~ *class *werkzeug.contrib.profiler.MergeStream(**streams*) An object that redirects write calls to multiple streams.Use this to log to both sys.stdout and a file: ~~~ f = open('profiler.log', 'w') stream = MergeStream(sys.stdout, f) profiler = ProfilerMiddleware(app, stream) ~~~ *class *werkzeug.contrib.profiler.ProfilerMiddleware(*app*, *stream=None*, *sort_by=('time'*, *'calls')*, *restrictions=()*, *profile_dir=None*) Simple profiler middleware. Wraps a WSGI application and profilesa request. This intentionally buffers the response so that timings aremore exact. By giving the profile_dir argument, pstat.Stats files are saved to thatdirectory, one file per request. Without it, a summary is printed tostream instead. For the exact meaning of sort_by and restrictions consult the[profile](http://docs.python.org/dev/library/profile.html#module-profile "(在 Python v3.5)") documentation. 0.9 新版功能: Added support for restrictions and profile_dir. <table class="docutils field-list" frame="void" rules="none"><col class="field-name"/><col class="field-body"/><tbody valign="top"><tr class="field-odd field"><th class="field-name">參數:</th><td class="field-body"><ul class="first last simple"><li><strong>app</strong> – the WSGI application to profile.</li><li><strong>stream</strong> – the stream for the profiled stats. defaults to stderr.</li><li><strong>sort_by</strong> – a tuple of columns to sort the result by.</li><li><strong>restrictions</strong> – a tuple of profiling strictions, not used if dumpingto <cite>profile_dir</cite>.</li><li><strong>profile_dir</strong> – directory name to save pstat files</li></ul></td></tr></tbody></table> werkzeug.contrib.profiler.make_action(*app_factory*, *hostname='localhost'*, *port=5000*, *threaded=False*, *processes=1*, *stream=None*, *sort_by=('time'*, *'calls')*, *restrictions=()*) Return a new callback for werkzeug.script that starts a localserver with the profiler enabled. ~~~ from werkzeug.contrib import profiler action_profile = profiler.make_action(make_app) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看