|
Last change
on this file since cfbfd31 was e0350e0, checked in by Michael Brooks <mlbrooks@…>, 5 months ago |
|
Recent rework of string benchmarks
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | # Read thesis-append-pbv.csv
|
|---|
| 2 | # Output for string-graph-peq-sharing.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 |
|
|---|
| 12 | import pandas as pd
|
|---|
| 13 | import numpy as np
|
|---|
| 14 | import os
|
|---|
| 15 | import sys
|
|---|
| 16 |
|
|---|
| 17 | sys.path.insert(0, os.path.dirname(__file__))
|
|---|
| 18 | from common import *
|
|---|
| 19 |
|
|---|
| 20 | prettyFieldNames = {
|
|---|
| 21 | "cfa-ll-share-na": "{/Helvetica=15 C{/Symbol \\42}} share",
|
|---|
| 22 | "stl-na-na-na": "STL",
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | timings = loadParseTimingData('result-append-pbv.csv')
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | # Filter operation=pbv, corpus=100-*-*+*+t0
|
|---|
| 29 |
|
|---|
| 30 | timings = timings.groupby('operation').get_group('pbv')
|
|---|
| 31 | timings = timings.groupby('corpus-nstrs-tgt').get_group(100)
|
|---|
| 32 | timings = timings.groupby('corpus-offset-instr').get_group('t0')
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 | # Emit in groups
|
|---|
| 36 |
|
|---|
| 37 | groupedSut = timings.groupby('sut')
|
|---|
| 38 |
|
|---|
| 39 | for sut, sgroup in groupedSut:
|
|---|
| 40 |
|
|---|
| 41 | if sut in prettyFieldNames:
|
|---|
| 42 |
|
|---|
| 43 | sgroup_sorted = sgroup.sort_values(by='corpusMeanLenCharsAct')
|
|---|
| 44 |
|
|---|
| 45 | print('"{header}"'.format(header=prettyFieldNames[sut]))
|
|---|
| 46 | text = sgroup_sorted[['corpusMeanLenCharsAct', 'op-duration-ns']].to_csv(header=False, index=False, sep='\t')
|
|---|
| 47 | print(text)
|
|---|
| 48 | print()
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.