Skip to content

feat: benchmark read and prepare time (UC-1.10) #16

Backlog

Description

@Akadib

Problem

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
  • News file added

Activity

  1. added theissue type on Dec 1, 2026
  2. added
    enhancement
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions