Ignore:
Timestamp:
May 10, 2022, 12:25:05 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
8faa6612
Parents:
3b80db8 (diff), 7edd5c1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/process-mutilate.py

    r3b80db8 r00675a1  
    1414parser = argparse.ArgumentParser(description='Python Script to convert output from mutilate to rmit like output')
    1515parser.add_argument('--out', nargs='?', type=argparse.FileType('w'), default=sys.stdout)
     16parser.add_argument('--var', nargs='?', type=str, default='Target QPS')
    1617try:
    1718        options =  parser.parse_args()
     
    3132
    3233        try:
     34                latAvs = fields[1]
    3335                lat50s = fields[6]
    3436                lat99s = fields[9]
     
    3739
    3840        try:
     41                latAv = locale.atof(latAvs)
    3942                lat50 = locale.atof(lat50s)
    4043                lat99 = locale.atof(lat99s)
     
    4245                raise Warning("Warning: \"{}\" \"{}\"! can't convert to float".format(lat50s, lat99s))
    4346
    44         return lat50, lat99
     47        return latAv, lat50, lat99
    4548
    4649def want0(line):
     
    5861                try:
    5962                        if   line.startswith("read"):
    60                                 rlat50, rlat99 = precentile(line)
     63                                rlatAv, rlat50, rlat99 = precentile(line)
    6164
    6265                        elif line.startswith("update"):
    63                                 ulat50, ulat99 = precentile(line)
     66                                ulatAv, ulat50, ulat99 = precentile(line)
    6467
    6568                        elif line.startswith("Total QPS"):
     
    8487
    8588        try:
     89                out['Average Read Latency'] = rlatAv
    8690                out['Median Read Latency'] = rlat50
    8791                out['Tail Read Latency'] = rlat99
     
    9094
    9195        try:
     96                out['Average Update Latency'] = ulatAv
    9297                out['Median Update Latency'] = ulat50
    9398                out['Tail Update Latency'] = ulat99
     
    112117                        continue
    113118
    114                 d = { 'Target QPS': int(rate) }
     119                d = { options.var : int(rate) }
    115120
    116121                w = extract( f, d )
Note: See TracChangeset for help on using the changeset viewer.