[Python-checkins] r75688 - sandbox/trunk/ccbench/ccbench.py

antoine.pitrou python-checkins at python.org
Sun Oct 25 00:41:49 CEST 2009


Author: antoine.pitrou
Date: Sun Oct 25 00:41:49 2009
New Revision: 75688

Log:
Output system properties at the beginning



Modified:
   sandbox/trunk/ccbench/ccbench.py

Modified: sandbox/trunk/ccbench/ccbench.py
==============================================================================
--- sandbox/trunk/ccbench/ccbench.py	(original)
+++ sandbox/trunk/ccbench/ccbench.py	Sun Oct 25 00:41:49 2009
@@ -17,6 +17,7 @@
 import subprocess
 import socket
 from optparse import OptionParser, SUPPRESS_HELP
+import platform
 
 # Compatibility
 try:
@@ -425,6 +426,20 @@
         options.throughput = options.latency = True
     if options.interval:
         sys.setcheckinterval(options.interval)
+
+    print("== %s %s (%s) ==" % (
+        platform.python_implementation(),
+        platform.python_version(),
+        platform.python_build()[0],
+    ))
+    # Processor identification often has repeated spaces
+    cpu = ' '.join(platform.processor().split())
+    print("== %s %s on '%s' ==" % (
+        platform.machine(),
+        platform.system(),
+        cpu,
+    ))
+    print()
     
     if options.throughput:
         print("--- Throughput ---")


More information about the Python-checkins mailing list