Commits

Robert Brewer committed 9e16a77

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

Comments (0)

Files changed (1)

cherrypy/test/benchmark.py

 
 MOUNT_POINT = "/cpbench/users/rdelon/apps/blog"
 
-__all__ = ['ABSession', 'Root', 'print_chart', 'read_process',
+__all__ = ['ABSession', 'Root', 'print_report', 'read_process',
            'run_standard_benchmarks', 'safe_threads',
-           'size_chart', 'startup', 'thread_chart',
+           'size_report', 'startup', 'thread_report',
            ]
 
 size_cache = {}
     safe_threads = (10, 20, 30, 40, 50)
 
 
-def thread_chart(path=MOUNT_POINT + "/", concurrency=safe_threads):
+def thread_report(path=MOUNT_POINT + "/", concurrency=safe_threads):
     sess = ABSession(path)
     attrs, names, patterns = zip(*sess.parse_patterns)
     rows = [('threads',) + names]
         rows.append([c] + [getattr(sess, attr) for attr in attrs])
     return rows
 
-def size_chart(sizes=(1, 10, 50, 100, 100000, 100000000),
+def size_report(sizes=(1, 10, 50, 100, 100000, 100000000),
                concurrency=50):
     sess = ABSession(concurrency=concurrency)
     attrs, names, patterns = zip(*sess.parse_patterns)
         rows.append([sz] + [getattr(sess, attr) for attr in attrs])
     return rows
 
-def print_chart(rows):
+def print_report(rows):
     widths = []
     for i in range(len(rows[0])):
         lengths = [len(str(row[i])) for row in rows]
 
 def run_standard_benchmarks():
     print
-    print "Thread Chart (1000 requests, 14 byte response body):"
-    print_chart(thread_chart())
+    print "Thread Report (1000 requests, 14 byte response body):"
+    print_report(thread_report())
     
     print
-    print "Thread Chart (1000 requests, 14 bytes via static_filter):"
-    print_chart(thread_chart("%s/static/index.html" % MOUNT_POINT))
+    print "Thread Report (1000 requests, 14 bytes via static_filter):"
+    print_report(thread_report("%s/static/index.html" % MOUNT_POINT))
     
     print
-    print "Size Chart (1000 requests, 50 threads):"
-    print_chart(size_chart())
+    print "Size Report (1000 requests, 50 threads):"
+    print_report(size_report())
 
 
 class NullRequest:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.