xpra icon
Bug tracker and wiki

Changeset 850 in xpra


Ignore:
Timestamp:
05/18/12 08:47:37 (12 months ago)
Author:
antoine
Message:

record screen size and "pixels_encoded_per_second", also add missing units to column headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xpra/test_measure_perf.py

    r847 r850  
    182182OPENGL_INFO = getoutput_line(["glxinfo"], "OpenGL renderer string", "Cannot detect OpenGL renderer string").split("OpenGL renderer string:")[1].strip() 
    183183 
     184import pygtk 
     185pygtk.require("2.0") 
     186import gtk                                      #@UnusedImport 
     187from gtk import gdk                             #@UnusedImport 
     188SCREEN_SIZE = gdk.get_default_root_window().get_size() 
     189print("screen size=%s" % str(SCREEN_SIZE)) 
    184190 
    185191#detect Xvnc version: 
     
    374380                result += [encoding, get_command_name(test_command)] 
    375381                result += [MEASURE_TIME, time.time(), CPU_INFO, PLATFORM, XORG_VERSION, OPENGL_INFO] 
     382                result += ["%sx%s" % gdk.get_default_root_window().get_size()] 
    376383                result += [compression, down, up, latency] 
    377384                result += measure_client(server_pid, name, client_cmd, get_stats_cb) 
     
    455462    last_output_bytecount = 0 
    456463    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] 
    462470    return [ 
    463471            d.get("regions_per_second", ""), 
    464472            d.get("pixels_per_second", ""), 
     473            d.get("pixels_encoded_per_second", ""), 
    465474            d.get("pixels_decoded_per_second", ""), 
    466475            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, 
    468477            (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, 
    470479            (int(d.get("output_bytecount", 0))-last_output_bytecount)/MEASURE_TIME, 
    471480            (int(d.get("output_mmap_bytecount", 0))-last_mmap_bytes)/MEASURE_TIME, 
     
    603612                print("Frames/sec=%s" % regions_s) 
    604613    return  [regions_s, "", "", "", 
    605              "", "", "", "", "", 
     614             "", "", "", "", "", "", 
    606615             "", "", "", 
    607616             "", "", "" 
     
    654663def get_stats_headers(): 
    655664    #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)", 
    660669             ] 
    661670 
     
    674683    print("results:") 
    675684    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", 
    678687               "compression", "download limit (KB)", "upload limit (KB)", "latency (ms)", 
    679688               "packets in/s", "packets in: bytes/s", "packets out/s", "packets out: bytes/s"] 
Note: See TracChangeset for help on using the changeset viewer.