|
Last change
on this file was 810c2c5, checked in by Michael Brooks <mlbrooks@…>, 6 days ago |
|
address two string-section oustanding items: remove confusing sentences; add attribution plot overlay for separate compilation overhead
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Rev | Line | |
|---|
| [810c2c5] | 1 | import pandas as pd
|
|---|
| 2 | import numpy as np
|
|---|
| 3 | import os
|
|---|
| 4 | import sys
|
|---|
| 5 | from pathlib import Path
|
|---|
| 6 |
|
|---|
| 7 | sys.path.insert(0, os.path.dirname(__file__))
|
|---|
| 8 | from common import *
|
|---|
| 9 |
|
|---|
| 10 | infile_attrib = os.path.dirname(os.path.abspath(__file__)) + '/../build/plot-string-allocn-attrib.dat'
|
|---|
| 11 | attribs = pd.read_csv(infile_attrib,
|
|---|
| 12 | sep='\t',
|
|---|
| 13 | header=0)
|
|---|
| 14 |
|
|---|
| 15 | infile_sepcmp = os.path.dirname(os.path.abspath(__file__)) + '/../benchmarks/string/string-separate-compilation-overhead.csv'
|
|---|
| 16 | sepcmps = pd.read_csv(infile_sepcmp,
|
|---|
| 17 | header=0)
|
|---|
| 18 |
|
|---|
| 19 | # putting the sepcmp bar at the top of 'other', so just below ctor-dtor
|
|---|
| 20 | category_above_semcmp = 'ctor-dtor'
|
|---|
| 21 |
|
|---|
| 22 | # print(attribs)
|
|---|
| 23 | # print(sepcmps)
|
|---|
| 24 |
|
|---|
| 25 | # print(attribs.columns)
|
|---|
| 26 |
|
|---|
| 27 | isfirst = True
|
|---|
| 28 |
|
|---|
| 29 | for _,scr in sepcmps.iterrows():
|
|---|
| 30 | size = scr['size']
|
|---|
| 31 | # tuning = r['tuning']
|
|---|
| 32 | attrib_key = attribs[ (attribs['corpus-meanlen-tgt'] == size) &
|
|---|
| 33 | (attribs['sut-platform'] == 'cfa') &
|
|---|
| 34 | ( attribs['category'] == category_above_semcmp )]
|
|---|
| 35 | attrib_key = attrib_key.copy()
|
|---|
| 36 | # print(attrib_key)
|
|---|
| 37 | assert( len(attrib_key) == 1 )
|
|---|
| 38 | # attrib_key = attrib_key.iloc[0] # convert from singleton table to row
|
|---|
| 39 | attrib_key['sepcmp-Delta'] = scr['mean DeltaOpDur']
|
|---|
| 40 | attrib_key['sepcmp-adjusted'] = attrib_key['grp-prior-duration-ns'] - attrib_key['sepcmp-Delta']
|
|---|
| 41 |
|
|---|
| 42 | print(attrib_key.to_csv(header=isfirst, index=False, sep='\t', na_rep="0"), end='')
|
|---|
| 43 | isfirst = False
|
|---|
| 44 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.