Skip to content

Add some statistics about buffer processing time and realtime things to make them somewhat meaningfull#50

Closed
fps wants to merge 5 commits intolv2:mainfrom
fps:rt-stats
Closed

Add some statistics about buffer processing time and realtime things to make them somewhat meaningfull#50
fps wants to merge 5 commits intolv2:mainfrom
fps:rt-stats

Conversation

@fps
Copy link
Copy Markdown
Contributor

@fps fps commented May 28, 2022

With these changes you can do now:

lv2bench -p 90 -m -b 8192 -n 48000000 -s

-m for mlockall, -p 90 for SCHED_FIFO at priority 90 and -s for summary statistics.

Example output (somewhat cleaned):

...
1.174098 http://drobilla.net/plugins/fomp/cs_phaser1_lfo
min: 0.199274 ms  avg: 0.200392 ms  max: 0.212089 ms
 requires feature , skipping
1.874370 http://drobilla.net/plugins/fomp/triple_chorus
min: 0.314569 ms  avg: 0.319913 ms  max: 19.336211 ms
0.828226 http://faust-lv2.googlecode.com/Freakclip
min: 0.138535 ms  avg: 0.141360 ms  max: 0.152053 ms
...
8.204352 http://guitarix.sourceforge.net/plugins/gx_cstb_#_cstb_
min: 1.325922 ms  avg: 1.370606 ms  max: 44.336362 ms

...

Here we can identify triple_chorus and/or gx_cstb_#_cstb to maybe do something fishy.

I'm willing to clean up the code as well as the PR more if there's a chance of merging at all ;)

@drobilla
Copy link
Copy Markdown
Collaborator

Cool, thanks.

Having better statistics would be nice, although it should be included in the usual output in a TSV-like way so it can be used to plot or otherwise work with the data. The intent of this tool is to output something easy to get into pandas or gnuplot or whatever. The option should probably be removed so the new columns are just always there.

… not jumping during measurement

- add code and options to enable realtime operation while running the plugins
- add code and option to measure individual buffers
- collect minimum, average and maximum buffer runtime (to detect candidate realtime failures in plugins)
@drobilla
Copy link
Copy Markdown
Collaborator

drobilla commented Aug 8, 2022

I rebased and more or less rewrote this on https://github.com/lv2/lilv/tree/rt-stats

The last commit adds a lot of platform-specific dependencies that would need to be tested for. I might merge everything up until the last commit and leave the realtime/mlock/buffer timings stuff on a branch for now.

@fps
Copy link
Copy Markdown
Contributor Author

fps commented Aug 14, 2022

Hi! Thanks for the feedback! :) I'll have to find some more time soon, to take a closer look again!

@drobilla
Copy link
Copy Markdown
Collaborator

Merged as 72b6c2c, thanks.

Aside from various cleanups, I removed the stuff that emitted results for every buffer, since that produced an output file that's not really usable. It could be added back as a separate option easily enough, but I'll leave that for future work.

@drobilla drobilla closed this Nov 25, 2025
@fps
Copy link
Copy Markdown
Contributor Author

fps commented Nov 26, 2025

Cool! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants