Beispiel #1
0
def make_graphs_cdf():
   data = {}
   times = {}
   cdfs = []
   title = sys.argv[1]
   xl = sys.argv[2]
   xr = np.arange( float(sys.argv[3]), float(sys.argv[4]), float(sys.argv[5]))
   yl = sys.argv[6]
   yr = np.arange( float(sys.argv[7]), float(sys.argv[8]), float(sys.argv[9]))
   percent = float(sys.argv[10])
   for filename in sys.argv[11:]:
      data[filename] = datautil.read_httpress_file( filename )
      times[filename] = map( lambda x : x.time, filter( lambda x: x.status == 'S', data[filename] ) )
      #cdfs.append( datautil.make_cdf( times[filename], 1000 ) )
      cdfs.append( times[filename][0:int(len(times[filename])*percent)] )
      #cdfs.append( times[filename] )

   cdf_compare( cdfs, title, xl, xr, yl, yr )
Beispiel #2
0
def make_graphs_cdf():
    data = {}
    times = {}
    cdfs = []
    title = sys.argv[1]
    xl = sys.argv[2]
    xr = np.arange(float(sys.argv[3]), float(sys.argv[4]), float(sys.argv[5]))
    yl = sys.argv[6]
    yr = np.arange(float(sys.argv[7]), float(sys.argv[8]), float(sys.argv[9]))
    percent = float(sys.argv[10])
    for filename in sys.argv[11:]:
        data[filename] = datautil.read_httpress_file(filename)
        times[filename] = map(
            lambda x: x.time, filter(lambda x: x.status == 'S',
                                     data[filename]))
        #cdfs.append( datautil.make_cdf( times[filename], 1000 ) )
        cdfs.append(times[filename][0:int(len(times[filename]) * percent)])
        #cdfs.append( times[filename] )

    cdf_compare(cdfs, title, xl, xr, yl, yr)
Beispiel #3
0
#!/usr/bin/python

import matplotlib.pyplot as plt
import numpy

import sys
sys.path.append("/home/jude/Desktop/research/syndicate/data")

import datautil

if __name__ == "__main__":
    data_100 = datautil.read_httpress_file("rp4-b1-c100-GET-61140.txt")
    data_500 = datautil.read_httpress_file("rp4-b1-c500-GET-61140.txt")

    success_times_100 = map(lambda x: x.time,
                            filter(lambda x: x.status == 'S', data_100))
    success_times_500 = map(lambda x: x.time,
                            filter(lambda x: x.status == 'S', data_500))

    success_cdf_100 = datautil.make_cdf(success_times_100, 1000)
    success_cdf_500 = datautil.make_cdf(success_times_500, 1000)

    datautil.show_cdfs([success_cdf_100],
                       xticks=0.1,
                       xspacing=25,
                       yticks=0.0125,
                       yspacing=2,
                       xlabel="Seconds",
                       ylabel="CDF(x)")
    datautil.show_cdfs([success_cdf_500],
                       xticks=0.1,
Beispiel #4
0
#!/usr/bin/python

import matplotlib.pyplot as plt
import numpy

import sys
sys.path.append("/home/jude/Desktop/research/syndicate/data")

import datautil


if __name__ == "__main__":
   data_100 = datautil.read_httpress_file("rp4-b1-c100-GET-61140.txt")
   data_500 = datautil.read_httpress_file("rp4-b1-c500-GET-61140.txt")

   success_times_100 = map( lambda x: x.time, filter( lambda x: x.status == 'S', data_100 ) )
   success_times_500 = map( lambda x: x.time, filter( lambda x: x.status == 'S', data_500 ) )
   
   success_cdf_100 = datautil.make_cdf( success_times_100, 1000 )
   success_cdf_500 = datautil.make_cdf( success_times_500, 1000 )

   datautil.show_cdfs( [success_cdf_100], xticks=0.1, xspacing=25, yticks=0.0125, yspacing=2, xlabel="Seconds", ylabel="CDF(x)" )
   datautil.show_cdfs( [success_cdf_500], xticks=0.1, xspacing=25, yticks=0.0125, yspacing=2, xlabel="Seconds", ylabel="CDF(x)" )