Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fps
Copy link

@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
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
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
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!

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