コード例 #1
0
ファイル: state.py プロジェクト: Awingu/celery
 def on_shutdown():
     if bench_first is not None and bench_last is not None:
         print('- Time spent in benchmark: {0!r}'.format(
               bench_last - bench_first))
         print('- Avg: {0}'.format(
               sum(bench_sample) / len(bench_sample)))
         memdump()
コード例 #2
0
ファイル: state.py プロジェクト: zzkristy/celery
 def on_shutdown():
     if bench_first is not None and bench_last is not None:
         print('- Time spent in benchmark: {0!r}'.format(bench_last -
                                                         bench_first))
         print('- Avg: {0}'.format(
             sum(bench_sample) / len(bench_sample)))
         memdump()
コード例 #3
0
ファイル: control.py プロジェクト: jdufresne/celery
def memdump(state, samples=10, **kwargs):  # pragma: no cover
    """Dump statistics of previous memsample requests."""
    from celery.utils import debug

    out = io.StringIO()
    debug.memdump(file=out)
    return out.getvalue()
コード例 #4
0
def memdump(state, samples=10, **kwargs):  # pragma: no cover
    """Dump statistics of previous memsample requests."""
    from celery.utils import debug

    out = io.StringIO()
    debug.memdump(file=out)
    return out.getvalue()
コード例 #5
0
ファイル: control.py プロジェクト: 1995rishi/flaskmap
def memdump(state, samples=10, **kwargs):  # pragma: no cover
    from celery.utils.debug import memdump
    out = io.StringIO()
    memdump(file=out)
    return out.getvalue()
コード例 #6
0
ファイル: control.py プロジェクト: skizhak/celery
def memdump(state, samples=10, **kwargs):  # pragma: no cover
    from celery.utils.debug import memdump
    out = io.StringIO()
    memdump(file=out)
    return out.getvalue()
コード例 #7
0
ファイル: state.py プロジェクト: leobantech/celery
 def on_shutdown():
     if bench_first is not None and bench_last is not None:
         print("- Time spent in benchmark: %r" % (
             bench_last - bench_first))
         print("- Avg: %s" % (sum(bench_sample) / len(bench_sample)))
         memdump()
コード例 #8
0
 def on_shutdown():
     if bench_first is not None and bench_last is not None:
         print('- Time spent in benchmark: %r' %
               (bench_last - bench_first))
         print('- Avg: %s' % (sum(bench_sample) / len(bench_sample)))
         memdump()
コード例 #9
0
ファイル: control.py プロジェクト: carlohamalainen/celery
def memdump(panel, samples=10, **kwargs):
    from celery.utils.debug import memdump
    out = StringIO()
    memdump(file=out)
    return out.getvalue()