示例#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
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
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
 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
def memdump(panel, samples=10, **kwargs):
    from celery.utils.debug import memdump
    out = StringIO()
    memdump(file=out)
    return out.getvalue()