WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.2% of users enabled 2FA.

Commit 4b949713 authored by John Zhang's avatar John Zhang
Browse files

target name as xticks label, display std_dev

parent d6265d34
......@@ -267,20 +267,27 @@ def plot(result_dic):
all_targets = ('cpython', 'pypy', 'pypy_nojit', 'rpy_c', 'rpy_mu', 'c')
compiled_targets = ('rpy_c', 'rpy_mu', 'c')
targets = compiled_targets
data = [(tgt, result_dic[tgt]['average'], result_dic[tgt]['std_dev'])
for tgt in compiled_targets]
for tgt in targets]
data.sort(key=lambda (tgt, avg, std): avg)
for i, (tgt, avg, std_dev) in enumerate(data):
ax.bar(width / 2 + width * i, avg, width, color=colors[i], yerr=std_dev, label=tgt)
ax.text(width / 2 + width * i + 0.01, avg, "%.6f" % avg, color='#1d1f21', fontweight='bold')
ax.text(width * (i + 1), avg - std_dev, "%.6f" % std_dev, color='#1d1f21', fontweight='bold')
plt.legend(loc=2)
# plt.legend(loc=2)
plt.xticks([width * (i + 1) for i in range(len(targets))], targets)
plt.title("%(test_name)s with input size %(input_size)d" % result_dic)
plt.show()
def test_plot():
plot(perf_quicksort(1000, 20))
# import json
# with open('result_quicksort.json', 'r') as fp:
# dic = json.load(fp)
# plot(dic)
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment