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