Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- import numpy as np
- import matplotlib.pyplot as plt
- import sys
- import itertools
- import subprocess
- data = [b for b in [re.split("\s+", i.strip('\n')) for i in open('40000_output.txt')] if len(b) > 1]
- final_data = [[int(re.sub("\w+_", '', a)), int(b)] for a, b in data]
- # VISUALIZATION
- # Transpose the data to get the x and y values
- labels, values = zip(*final_data)
- # from the number of the length
- indexes = np.arange(len(labels))
- width = 1
- plt.xlabel("Execution Attempt")
- plt.ylabel("Time to Completion (Nanosecond)")
- plt.bar(indexes, values, width)
- plt.xticks(indexes + width * 0.5, labels)
- plt.show()
Add Comment
Please, Sign In to add comment