Changeset 850 in xpra
- Timestamp:
- 05/18/12 08:47:37 (12 months ago)
- File:
-
- 1 edited
-
trunk/src/xpra/test_measure_perf.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/xpra/test_measure_perf.py
r847 r850 182 182 OPENGL_INFO = getoutput_line(["glxinfo"], "OpenGL renderer string", "Cannot detect OpenGL renderer string").split("OpenGL renderer string:")[1].strip() 183 183 184 import pygtk 185 pygtk.require("2.0") 186 import gtk #@UnusedImport 187 from gtk import gdk #@UnusedImport 188 SCREEN_SIZE = gdk.get_default_root_window().get_size() 189 print("screen size=%s" % str(SCREEN_SIZE)) 184 190 185 191 #detect Xvnc version: … … 374 380 result += [encoding, get_command_name(test_command)] 375 381 result += [MEASURE_TIME, time.time(), CPU_INFO, PLATFORM, XORG_VERSION, OPENGL_INFO] 382 result += ["%sx%s" % gdk.get_default_root_window().get_size()] 376 383 result += [compression, down, up, latency] 377 384 result += measure_client(server_pid, name, client_cmd, get_stats_cb) … … 455 462 last_output_bytecount = 0 456 463 if last_record: 457 last_input_packetcount = last_record[4] 458 last_input_bytecount = last_record[5] 459 last_output_packetcount = last_record[6] 460 last_output_bytecount = last_record[7] 461 last_mmap_bytes = last_record[8] 464 index = 5 465 last_input_packetcount = last_record[index] 466 last_input_bytecount = last_record[index+1] 467 last_output_packetcount = last_record[index+2] 468 last_output_bytecount = last_record[index+3] 469 last_mmap_bytes = last_record[index+4] 462 470 return [ 463 471 d.get("regions_per_second", ""), 464 472 d.get("pixels_per_second", ""), 473 d.get("pixels_encoded_per_second", ""), 465 474 d.get("pixels_decoded_per_second", ""), 466 475 d.get("avg_batch_delay", ""), 467 int(d.get("input_packetcount", 0))-last_input_packetcount ,476 int(d.get("input_packetcount", 0))-last_input_packetcount/MEASURE_TIME, 468 477 (int(d.get("input_bytecount", 0))-last_input_bytecount)/MEASURE_TIME, 469 int(d.get("output_packetcount", 0))-last_output_packetcount ,478 int(d.get("output_packetcount", 0))-last_output_packetcount/MEASURE_TIME, 470 479 (int(d.get("output_bytecount", 0))-last_output_bytecount)/MEASURE_TIME, 471 480 (int(d.get("output_mmap_bytecount", 0))-last_mmap_bytes)/MEASURE_TIME, … … 603 612 print("Frames/sec=%s" % regions_s) 604 613 return [regions_s, "", "", "", 605 "", "", "", "", "", 614 "", "", "", "", "", "", 606 615 "", "", "", 607 616 "", "", "" … … 654 663 def get_stats_headers(): 655 664 #the stats that are returned by get_xpra_stats or get_vnc_stats 656 return ["Regions/s", "Pixels/s ", "Decoding Pixels/s", "Average Batch Delay",657 "Application packets in ", "Application bytes in/s", "Application packets out", "Application bytes out/s", "mmap bytes/s",658 "Min Client Latency ", "Max Client Latency", "Avg Client Latency",659 "Min Server Latency ", "Max Server Latency", "Avg Server Latency",665 return ["Regions/s", "Pixels/s Sent", "Encoding Pixels/s", "Decoding Pixels/s", "Average Batch Delay", 666 "Application packets in/s", "Application bytes in/s", "Application packets out/s", "Application bytes out/s", "mmap bytes/s", 667 "Min Client Latency (ms)", "Max Client Latency (ms)", "Avg Client Latency (ms)", 668 "Min Server Latency (ms)", "Max Server Latency (ms)", "Avg Server Latency (ms)", 660 669 ] 661 670 … … 674 683 print("results:") 675 684 headers = ["Test Name", "Remoting Tech", "Server Version", "Client Version", 676 "Encoding", "Test Command", "Sample Duration ", "Sample Time",677 "CPU info", "Platform", "Xorg version", "OpenGL", 685 "Encoding", "Test Command", "Sample Duration (s)", "Sample Time (epoch)", 686 "CPU info", "Platform", "Xorg version", "OpenGL", "Screen Size", 678 687 "compression", "download limit (KB)", "upload limit (KB)", "latency (ms)", 679 688 "packets in/s", "packets in: bytes/s", "packets out/s", "packets out: bytes/s"]
Note: See TracChangeset
for help on using the changeset viewer.