Skip to content

Commit

Permalink
Merge pull request #8 from Shuo-Jia/fix-parse
Browse files Browse the repository at this point in the history
fix: fix result parse script to support read only
  • Loading branch information
foreverneverer authored Jun 12, 2020
2 parents b82895a + d75d784 commit e21d2b7
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions pegasus/bin/parse_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,26 @@ def parseLine(line: str, resultTable):
# Insert
segments = value.split('\\n[INSERT],')
segments = list(map(str.strip, segments))
# W-QPS
ops = parseNum(findAttrKeyInValue(segments, 'Operations,'))
qps = ops / runTimeSec
# W-AVG-Lat
avg = findAttrKeyInValue(segments, 'AverageLatency(us),')
# W-P95-Lat
p95 = findAttrKeyInValue(segments, '95.0thPercentileLatency(us),')
# W-P99-Lat
p99 = findAttrKeyInValue(segments, '99.0thPercentileLatency(us),')
# W-P999-Lat
p999 = findAttrKeyInValue(segments, '99.9thPercentileLatency(us),')
# W-P9999-Lat
p9999 = findAttrKeyInValue(segments, '99.99thPercentileLatency(us),')
# W-MAX-Lat
maxL = findAttrKeyInValue(segments, 'MaxLatency(us),')
row = row + [int(qps), parseNum(avg), parseNum(p95), parseNum(
if len(segments) > 1:
# W-QPS
ops = parseNum(findAttrKeyInValue(segments, 'Operations,'))
qps = ops / runTimeSec
# W-AVG-Lat
avg = findAttrKeyInValue(segments, 'AverageLatency(us),')
# W-P95-Lat
p95 = findAttrKeyInValue(segments, '95.0thPercentileLatency(us),')
# W-P99-Lat
p99 = findAttrKeyInValue(segments, '99.0thPercentileLatency(us),')
# W-P999-Lat
p999 = findAttrKeyInValue(segments, '99.9thPercentileLatency(us),')
# W-P9999-Lat
p9999 = findAttrKeyInValue(segments, '99.99thPercentileLatency(us),')
# W-MAX-Lat
maxL = findAttrKeyInValue(segments, 'MaxLatency(us),')
row = row + [int(qps), parseNum(avg), parseNum(p95), parseNum(
p99), parseNum(p999), parseNum(p9999), parseNum(maxL)]
else: # else: load mode, no write result.
row = row + [0, 0, 0, 0, 0, 0, 0]

# Read
segments = value.split('\\n[READ],')
Expand Down

0 comments on commit e21d2b7

Please sign in to comment.