• Gabriel Charette's avatar
    [WaitableEvent] Fix perf tests · 1544a002
    Gabriel Charette authored
    WaitableEventPerfTest.Throughput was incorrect; it relied on a const
    samples() but was looping through as many iterations as possible for
    1 second... so the report was garbage. The test was disabled because
    the vector went over the allocated capacity (faster machines now mean
    this test can do in the order of 1'000'000 operations in 1 second).
    
    Allocating a vector of a million entries just to accumulate later is
    overkill. Switched to accumulating as we go.
    
    An upcoming change of mine will improve perf further I think; cleaning
    up and re-enabling these tests before helps show the delta.
    
    Renamed the tests to have them prefixed by "WaitableEvent" so they're
    easier to find on the perf dashboard (continuity is not an issue).
    
    R=kylechar@chromium.org
    
    Bug: 848499, 905412
    Change-Id: I021886b472bfbb698af615038e393a92e654a122
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718598
    Commit-Queue: Gabriel Charette <gab@chromium.org>
    Auto-Submit: Gabriel Charette <gab@chromium.org>
    Reviewed-by: default avatarkylechar <kylechar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#681152}
    1544a002
waitable_event_perftest.cc 4.26 KB