Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 994

Show
Ignore:
Timestamp:
03/02/06 14:02:39
Author:
fumanchu
Message:

Benchmark: changed 'chart' to 'report' throughout.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/test/benchmark.py

    r993 r994  
    1515MOUNT_POINT = "/cpbench/users/rdelon/apps/blog" 
    1616 
    17 __all__ = ['ABSession', 'Root', 'print_chart', 'read_process', 
     17__all__ = ['ABSession', 'Root', 'print_report', 'read_process', 
    1818           'run_standard_benchmarks', 'safe_threads', 
    19            'size_chart', 'startup', 'thread_chart', 
     19           'size_report', 'startup', 'thread_report', 
    2020           ] 
    2121 
     
    170170 
    171171 
    172 def thread_chart(path=MOUNT_POINT + "/", concurrency=safe_threads): 
     172def thread_report(path=MOUNT_POINT + "/", concurrency=safe_threads): 
    173173    sess = ABSession(path) 
    174174    attrs, names, patterns = zip(*sess.parse_patterns) 
     
    180180    return rows 
    181181 
    182 def size_chart(sizes=(1, 10, 50, 100, 100000, 100000000), 
     182def size_report(sizes=(1, 10, 50, 100, 100000, 100000000), 
    183183               concurrency=50): 
    184184    sess = ABSession(concurrency=concurrency) 
     
    191191    return rows 
    192192 
    193 def print_chart(rows): 
     193def print_report(rows): 
    194194    widths = [] 
    195195    for i in range(len(rows[0])): 
     
    205205def run_standard_benchmarks(): 
    206206    print 
    207     print "Thread Chart (1000 requests, 14 byte response body):" 
    208     print_chart(thread_chart()) 
    209      
    210     print 
    211     print "Thread Chart (1000 requests, 14 bytes via static_filter):" 
    212     print_chart(thread_chart("%s/static/index.html" % MOUNT_POINT)) 
    213      
    214     print 
    215     print "Size Chart (1000 requests, 50 threads):" 
    216     print_chart(size_chart()) 
     207    print "Thread Report (1000 requests, 14 byte response body):" 
     208    print_report(thread_report()) 
     209     
     210    print 
     211    print "Thread Report (1000 requests, 14 bytes via static_filter):" 
     212    print_report(thread_report("%s/static/index.html" % MOUNT_POINT)) 
     213     
     214    print 
     215    print "Size Report (1000 requests, 50 threads):" 
     216    print_report(size_report()) 
    217217 
    218218 

Hosted by WebFaction

Log in as guest/cpguest to create tickets