You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: benchmark read and prepare time (UC-1.10) #16
As the developer, I want to measure how long frames take to process, so I know how many fit in the 1 s verdict budget.
Proposed solution
diffpy-diffchooser bench RUN [--frames 10] [--binning 4] times frames spread across the whole run (not only the first ones, so caching does not hide the cost). --binning is the shrink factor used to prepare a frame (UC-1.5).
It prints:
Output
Meaning
Open time
time to open the run
Read time, mean and max
time to load one frame from disk
Prepare time, mean
time to make faint peaks visible in one frame (UC-1.5)
Frames in budget
1 s / (mean read time + mean prepare time), rounded down
Image shape and frame count
size of one frame and number of frames in the run
Example of the calculation (made-up times): 0.11 s to read + 0.20 s to prepare = 0.31 s per frame, so 3 frames fit in 1 s.
bench measures speed only. It gives no verdict, and "frames in budget" leaves out the open time.
Done when
Unit test runs bench on the synthetic run
Numbers for run A07 on the lab Mac are posted in the release issue and included in the release notes
Activity