source: doc/theses/mike_brooks_MMath/plots/string-peq-cppemu.py@ a17f496

Last change on this file since a17f496 was e0350e0, checked in by Michael Brooks <mlbrooks@…>, 4 months ago

Recent rework of string benchmarks

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[f85de47]1# Read thesis-append-pbv.csv
2# Output for string-graph-peq-cppemu.dat
3
4# Project details
5# Filter operation=peq
6# Split "series" goups of sut; only those in the "pretty" list
7# Assert one row per string-length
8# output:
9# string-len op-duration
10# in chunks, each headed by pertty(sut)
11
12import pandas as pd
13import numpy as np
[2410424]14import sys
[f85de47]15import os
16
[2410424]17sys.path.insert(0, os.path.dirname(__file__))
18from common import *
[f85de47]19
20prettyFieldNames = {
21 "cfa-ll-noshare-fresh": "{/Helvetica=15 C{/Symbol \\42} +=} noshare fresh",
22 "cfa-ll-noshare-reuse": "{/Helvetica=15 C{/Symbol \\42} +=} noshare reuse",
23 "stl-na-na-fresh": "STL {/Helvetica=15 +=} fresh",
24 "stl-na-na-reuse": "STL {/Helvetica=15 +=} reuse",
25}
26
[2410424]27timings = loadParseTimingData('result-append-pbv.csv')
[f85de47]28
[e0350e0]29# Filter operation=peq, corpus=100-*-*+*+t0
[f85de47]30
[2410424]31timings = timings.groupby('operation').get_group('peq')
[e0350e0]32timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
33timings = timings.groupby('corpus-offset-instr').get_group('t0')
34
35
[f85de47]36
37# Emit in groups
38
[2410424]39groupedSut = timings.groupby('sut')
[f85de47]40
41for sut, sgroup in groupedSut:
42
43 if sut in prettyFieldNames:
44
[e0350e0]45 sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
[f85de47]46
47 print('"{header}"'.format(header=prettyFieldNames[sut]))
[e0350e0]48 text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
[f85de47]49 print(text)
50 print()
Note: See TracBrowser for help on using the repository browser.