Add asymptotes for benchmarking framework #17375

pull JeremyRubin wants to merge 1 commits into bitcoin:master from JeremyRubin:asymptotic-benchmarks changing 4 files +109 −29
  1. JeremyRubin commented at 0:30 am on November 5, 2019: contributor

    It can be pretty convenient for certain classes of benchmark to be able to run it with dynamic parameters, to generate curves of magnitudes runtimes.

    This PR adds this functionality and shows an example using it.

    This functionality is a bit useless unless you also combine it with a filter to ensure the params are meaningful for the target asymptotic benchmark.

  2. fanquake added the label Tests on Nov 5, 2019
  3. in src/bench/bench_bitcoin.cpp:29 in f160100ce4 outdated
    25@@ -25,6 +26,7 @@ static void SetupBenchArgs()
    26     gArgs.AddArg("-evals=<n>", strprintf("Number of measurement evaluations to perform. (default: %u)", DEFAULT_BENCH_EVALUATIONS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    27     gArgs.AddArg("-filter=<regex>", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    28     gArgs.AddArg("-scaling=<n>", strprintf("Scaling factor for benchmark's runtime (default: %u)", DEFAULT_BENCH_SCALING), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    29+    gArgs.AddArg("-asymptote=n", strprintf("Asymptotic factors for benchmark's runtime, positional (default: \"\")"), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    


    laanwj commented at 9:45 am on November 6, 2019:
    Can you please add some short summary, as to what ‘asymptotic factors’ mean in this context? I don’t think it’s self-explanatory, this argument help gives me zero context on how to use it in practice :smile:

    JeremyRubin commented at 7:45 pm on November 11, 2019:
    I squash-pushed improved documentation for this parameter, which includes an example of how to use it.
  4. MarcoFalke commented at 3:48 pm on November 7, 2019: member
    Not sure how useful the general framework is. A smaller patch would be to just copy past the BENCHMARK(ComplexMemPool, 1); line and hardcode the “asymptotes”. Or if you like, make the benchmark settings dynamic, so that an asymptote can be created by running bench_bitcoin -filter=... -scale_asymptotes_factor=5 to multiply all dynamic settings in the selected/filtered bench by that factor.
  5. JeremyRubin commented at 11:18 pm on November 7, 2019: contributor

    @MarcoFalke that’s insufficient for the example given. In that benchmark, all different sorts of asymptotic behaviors can be triggered with different growth factors.

    I typically run it something like this:

    for x in 10 100 1000 10000 100000 1000000; do ./src/bench/bench_bitcoin -asymptote=100 -asymptote=100 -asymptote=$x -asymptote=10 --evals=1; done | grep Com --line-buffered | cut -d, -f6

    Scaling all the factors doesn’t let you express nuances.

    The other issue is that if you just copy the existing Benchmark stuff you lose the ‘runs in one second" property.

  6. Add asymptotes for benchmarking framework 32862e54af
  7. JeremyRubin force-pushed on Nov 11, 2019
  8. DrahtBot commented at 6:37 pm on December 20, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17781 (rpc: Remove mempool global from miner by MarcoFalke)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. DrahtBot commented at 11:22 pm on January 2, 2020: member
  10. DrahtBot added the label Needs rebase on Jan 2, 2020
  11. JeremyRubin added this to the "Testing" column in a project

  12. JeremyRubin commented at 8:12 pm on January 28, 2020: contributor
  13. JeremyRubin closed this on Jan 28, 2020

  14. martinus referenced this in commit bf5ae5ed0f on Feb 20, 2020
  15. martinus referenced this in commit 3717979568 on Mar 7, 2020
  16. martinus referenced this in commit 5a60c3abf6 on Mar 8, 2020
  17. martinus referenced this in commit 4c33547849 on Mar 28, 2020
  18. martinus referenced this in commit 78c312c983 on Jun 13, 2020
  19. Warchant referenced this in commit 355f278c10 on Aug 6, 2020
  20. PastaPastaPasta referenced this in commit 79eef7b3d0 on May 1, 2021
  21. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me