Created
July 10, 2018 08:41
-
-
Save sorpaas/2040b1fdc003a1a44ef6a1ec04ea6ed5 to your computer and use it in GitHub Desktop.
EVM Benchmark Formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
mastercsv = {} | |
with open("./result-master.tsv", "r") as csvfile: | |
csvreader = csv.reader(csvfile, delimiter='\t') | |
for row in csvreader: | |
mastercsv[row[0]] = float(row[1]) | |
prcsv = {} | |
with open("./result-pr.tsv", "r") as csvfile: | |
csvreader = csv.reader(csvfile, delimiter='\t') | |
for row in csvreader: | |
prcsv[row[0]] = float(row[1]) | |
cmpcsv = {} | |
for key in mastercsv: | |
cmpcsv[key] = prcsv[key] / mastercsv[key] | |
import os | |
performanceTests = list(map(lambda x: "{}-INT".format(x[0:-5]), | |
os.listdir("./ethcore/res/ethereum/tests/VMTests/vmPerformance"), | |
)) | |
print({ key: cmpcsv[key] for key in performanceTests }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment