[PATCH v2 3/5] benchtests: Add a script to convert benchout string JSON to CSV
Siddhesh Poyarekar
siddhesh@gotplt.org
Sat Jul 31 10:47:44 GMT 2021
On 7/30/21 12:35 PM, naohirot@fujitsu.com wrote:
> Hi Siddhesh,
>
> Thank you for the advice!
>
>> Most people in the community who work in string function improvements
>> tend to use (and improve wherever it is lacking)
>> benchtests/scripts/compare_strings.py for their result analysis. Adding
>> a flag to dump csv to that script ought to be trivial if that's what you
>> need.
>
> I see. I didn't use compare_strings.py daily, but plot_strings.py.
>
>> The script is under-documented though, so perhaps a wiki page describing
>> what the script does and various example uses would go a very long way.
>
> I found the wiki page.
> https://sourceware.org/glibc/wiki/benchmarking/benchmarks
Yeah that needs to improve :/
>> The reason for emitting json is precisely to allow developers to
>> implement their own analysis tools around them when their use cases are
>> niche. Your specific use case is not niche and could be added as a flag
>> to compare_strings.py if needed. You only need a new flag --csv (or -o
>> csv, tab, etc.) to print in csv instead of the current output, which is
>> meant for reading on the terminal.
>
> Yes, converting to CSV in Python will be easy.
> But comparing two string benchout results directly between "before" and "after"
> was not so easy AFAIK.
> And creating graphs in spreadsheet manually is tolerable in a few times, but not
> in frequent times.
> That's the reason I created another 'jq' script, merge_strings4graph.sh".
> Dose most people compare the two results indirectly through a common base ifunc
> using "--base" option of compare_strings.py or "--baseline" option of plot_strings.py?
If you need to compare two results then just set one as the base using
the --base/--baseline and see how the other compares. That's usually
sufficient to justify addition of new variants to glibc.
Siddhesh
More information about the Libc-alpha
mailing list