view MoinMoin/scripts/ @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <>
date Thu, 22 Sep 2005 15:09:50 +0000
children be33ecd58d4e
line wrap: on
line source

#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
    MoinMoin - Print statistics gathered by hotshot profiler

    Usage: statsfile
    Typical usage:
     1. Edit and activate the hotshot profiler, set profile file name
     2. Run
     3. Do some request, with a browser, script or ab
     4. Stop
     5. Run this tool:

    Currently CGI and twisted also have a hotshot profiler integration.
    @copyright: 2005 by Thomas Waldmann (MoinMoin:ThomasWaldmann)
    @license: GNU GPL, see COPYING for details.

import sys
from hotshot import stats

if len(sys.argv) != 2:
    print __doc__
# Load and print stats 
s = stats.load(sys.argv[1])
s.sort_stats('cumulative', 'time', 'calls')