Skip to content

Instantly share code, notes, and snippets.

@sbesson
Created March 25, 2025 08:47
Show Gist options
  • Save sbesson/5f030b9cb1a05bfd2f90a6c89a19eaef to your computer and use it in GitHub Desktop.
Save sbesson/5f030b9cb1a05bfd2f90a6c89a19eaef to your computer and use it in GitHub Desktop.
Reads the CSV produced by the memo_reqenerator SQL query and plots the distribution of initialization times
import matplotlib.pyplot
import numpy
import pandas
colnames=[
'Image', 'Pixels', 'Series', 'Pixel type',
'SizeX', 'SizeY', 'SizeZ', 'SizeC', 'SizeT',
'Format', 'Time', 'Rank']
df = pandas.read_csv(
"image_list_20250404.csv",
names=colnames,
parse_dates=["Time"],
date_format='%M:%S.%f')
times = pandas.to_timedelta(df['Time']) / numpy.timedelta64(1, "s")
ax = times.hist(bins=20, color='darkorange')
ax.set_yscale('log')
ax.grid(False)
matplotlib.pyplot.xlabel('Initialization time (s)')
matplotlib.pyplot.ylabel('Number of filesets')
matplotlib.pyplot.show()
matplotlib.pyplot.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment