Fixed bug in performance counter script.

This commit is contained in:
Ross Thompson 2023-03-02 22:32:13 -06:00
parent 1f3639bff6
commit 724f2634c5

View File

@ -205,9 +205,9 @@ if(sys.argv[1] == '-b'):
for benchmark in benchmarkAll: for benchmark in benchmarkAll:
(name, opt, config, dataDict) = benchmark (name, opt, config, dataDict) = benchmark
if name+'_'+opt in benchmarkDict: if name+'_'+opt in benchmarkDict:
benchmarkDict[name+'_'+opt].append((config, dataDict['BTMR'])) benchmarkDict[name+'_'+opt].append((config, dataDict['BDMR']))
else: else:
benchmarkDict[name+'_'+opt] = [(config, dataDict['BTMR'])] benchmarkDict[name+'_'+opt] = [(config, dataDict['BDMR'])]
size = len(benchmarkDict) size = len(benchmarkDict)
index = 1 index = 1
@ -248,11 +248,11 @@ if(sys.argv[1] == '-b'):
dct[PredType] = (currSize, currPercent) dct[PredType] = (currSize, currPercent)
print(dct) print(dct)
fig, axes = plt.subplots() fig, axes = plt.subplots()
marker={'twobit' : '^', 'gshare' : 'o', 'global' : 's', 'gshareBasic' : '*', 'globalBasic' : 'x'} marker={'twobit' : '^', 'gshare' : 'o', 'global' : 's', 'gshareBasic' : '*', 'globalBasic' : 'x', 'btb': 'x'}
colors={'twobit' : 'black', 'gshare' : 'blue', 'global' : 'dodgerblue', 'gshareBasic' : 'turquoise', 'globalBasic' : 'lightsteelblue'} colors={'twobit' : 'black', 'gshare' : 'blue', 'global' : 'dodgerblue', 'gshareBasic' : 'turquoise', 'globalBasic' : 'lightsteelblue', 'btb' : 'blue'}
for cat in dct: for cat in dct:
(x, y) = dct[cat] (x, y) = dct[cat]
x=[int(2**int(v)/4) for v in x] x=[int(2**int(v)) for v in x]
print(x, y) print(x, y)
axes.plot(x,y, color=colors[cat]) axes.plot(x,y, color=colors[cat])
axes.scatter(x,y, label=cat, marker=marker[cat], color=colors[cat]) axes.scatter(x,y, label=cat, marker=marker[cat], color=colors[cat])
@ -262,9 +262,9 @@ if(sys.argv[1] == '-b'):
axes.legend(loc='upper left') axes.legend(loc='upper left')
axes.set_xscale("log") axes.set_xscale("log")
axes.set_ylabel('Prediction Accuracy') axes.set_ylabel('Prediction Accuracy')
axes.set_xlabel('Size (bytes)') axes.set_xlabel('Entries')
axes.set_xticks([16, 64, 256, 1024, 4096, 16384]) axes.set_xticks([64, 256, 1024, 4096, 16384, 65536])
axes.set_xticklabels([16, 64, 256, 1024, 4096, 16384]) axes.set_xticklabels([64, 256, 1024, 4096, 16384, 65536])
axes.grid(color='b', alpha=0.5, linestyle='dashed', linewidth=0.5) axes.grid(color='b', alpha=0.5, linestyle='dashed', linewidth=0.5)
plt.show() plt.show()