diff --git a/scripts/histogram_function_sizes.py b/scripts/histogram_function_sizes.py index a98841f912719c52e70d8acb4822bf00065fee90..2a8d43b5cf231ce9e9cdf337f9be206b81c1c470 100755 --- a/scripts/histogram_function_sizes.py +++ b/scripts/histogram_function_sizes.py @@ -2,6 +2,7 @@ import collections import matplotlib.pyplot as plt +import numpy import pandas import statistics import sys @@ -33,7 +34,9 @@ print(' * Statistics:') print(' * Number of ranges: {}'.format(len(all_ranges))) print(' * .. Mean: {}'.format(df["Function Size"].mean())) print(' * .. Median: {}'.format(df["Function Size"].median())) +print(' * .. 95th quantile: {}'.format(df["Function Size"].quantile(.95))) print(' * .. Max: {}'.format(df["Function Size"].max())) +print(' * .. Total number of bytes: {}'.format(df["Function Size"].sum())) print(' * Plotting...') xlim = (-10, max_x) diff --git a/scripts/plot_codesize.py b/scripts/plot_codesize.py index 5fa0e5a0413d02d09a5d13b1f1c2886cf82b78ae..66e92d488459814993f291f95abec22579c14a7c 100644 --- a/scripts/plot_codesize.py +++ b/scripts/plot_codesize.py @@ -42,6 +42,7 @@ ax = seaborn.barplot(x='filename', hue='variable', data=data) ax.ticklabel_format(style='plain', axis='y') +ax.set_xticklabels(ax.get_xticklabels(), rotation=45, horizontalalignment='right') change_width(ax, .30) @@ -58,8 +59,8 @@ plt.legend(handles, ax.set_xlabel('Library filename') ax.set_ylabel('Number of code bytes in file') ax.set_ylim((0, 1100000)) -ax.bar_label(handles[0], padding=10, fmt='%d') -ax.bar_label(handles[1], padding=10, fmt='%d') +ax.bar_label(handles[0], padding=10, fmt='%d', rotation='vertical') +ax.bar_label(handles[1], padding=10, fmt='%d', rotation='vertical') # Write the plot out plt.tight_layout() diff --git a/scripts/plot_runtimes.py b/scripts/plot_runtimes.py index 99d96f24316bdb42e45245b4d46c5f2da4e05ec3..46eb364db533741a37455b7fcc3da31a127fcc5c 100644 --- a/scripts/plot_runtimes.py +++ b/scripts/plot_runtimes.py @@ -73,7 +73,7 @@ for ax in (ax3,): handles, labels = ax.get_legend_handles_labels() # Add the labels to both handles # ax.set_xlabel('Number of code bytes in file') - ax.set_xlabel('Processing time') + ax.set_xlabel('Processing time in seconds') ax.set_ylabel('Library filename') # ax.bar_label(handles[0], padding=20, fmt='%.2f') # ax.bar_label(handles[1], padding=10, fmt='%.2f')