Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
B
benchmark
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • benchmark
  • Repository

Switch branch/tag
  • benchmark
  • test
  • basic_test.cc
Find file
BlameHistoryPermalink
  • Matt Armstrong's avatar
    Use fewer ramp up repetitions when KeepRunningBatch is used (#1113) · 69054ae5
    Matt Armstrong authored Apr 19, 2021
    Use the benchmark's reported iteration count when estimating
    iterations for the next repetition, rather than the requested
    iteration count.  When the benchmark uses KeepRunningBatch the actual
    iteration count can be larger than the one the runner requested.
    
    Prior to this fix the runner was underestimating the next iteration
    count, sometimes significantly so.  Consider the case of a benchmark
    using a batch size of 1024.  Prior to this change, the benchmark
    runner would attempt iteration counts 1, 10, 100 and 1000, yet the
    benchmark itself would do the same amount of work each time: a single
    batch of 1024 iterations.  The discrepancy could also contribute to
    estimation errors once the benchmark time reached 10% of the target.
    For example, if the very first batch of 1024 iterations reached 10% of
    benchmark_min_min time, the runner would attempt to scale that to 100%
    from a basis of one iteration rather than 1024.
    
    This bug was particularly noticeable in benchmarks with large batch
    sizes, especially when the benchmark also had slow set up or tear down
    phases.
    
    With this fix in place it is possible to use KeepRunningBatch to
    achieve a kind of "minimum iteration count" feature by using a larger
    fixed batch size.  For example, a benchmark may build a map of 500K
    elements and test a "find" operation.  There is no point in running
    "find" just 1, 10, 100, etc., times.  The benchmark can now pick a
    batch size of something like 10K, and the runner will arrive at the
    final max iteration count with in noticeably fewer repetitions.
    69054ae5
basic_test.cc 4.48 KB
EditWeb IDE
×

Replace basic_test.cc

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.