lukecwik opened a new pull request, #22002:
URL: https://github.com/apache/beam/pull/22002

   This counter is limited to be used with a specific thread interaction 
pattern that is well suited to be used as a system level bundle specific 
counter and may not be suitable as a user counter.
   
   The new counter is 8.5x faster on updates and even more on reset.
   ```
   Benchmark                                                               Mode 
 Cnt          Score          Error  Units
   MetricsBenchmark.testCounterCellMutation                               thrpt 
  25  101509847.937 ±   100089.022  ops/s
   MetricsBenchmark.testCounterCellReset                                  thrpt 
  25   34072850.016 ±    70718.608  ops/s
   MetricsBenchmark.testSerialMutatorAndFinalReaderBundleCounterMutation  thrpt 
  25  854084919.952 ± 41010094.337  ops/s
   MetricsBenchmark.testSerialMutatorAndFinalReaderBundleCounterReset     thrpt 
  25  415817398.009 ±   869847.035  ops/s
   ```
   
   Also clean-up the short id reporting mechanism to bind the short id once 
during instantiation instead of during each progress report. This clean-up has 
a tiny impact on the bundle benchmarks as can be seen:
   Before this change:
   ```
   Benchmark                                Mode  Cnt     Score      Error  
Units
   ProcessBundleBenchmark.testLargeBundle  thrpt   25  1155.848  ±   7.517  
ops/s
   ProcessBundleBenchmark.testTinyBundle   thrpt   25  28858.064 ±  98.341  
ops/s
   ```
   
   After this change:
   ```
   Benchmark                                Mode  Cnt     Score      Error  
Units
   ProcessBundleBenchmark.testLargeBundle  thrpt   25  1155.204  ±   9.236  
ops/s
   ProcessBundleBenchmark.testTinyBundle   thrpt   25  29000.767 ± 195.753  
ops/s
   ```
   
   The perf profiles show a better change of CPU usage reduction since the 
above benchmarks also include the runner side setup and JMH overhead:
   * -0.587% for processBundle on larger bundles
   * -0.282% for processBundle on smaller bundles
   
   Future work would be to update msec counters which are also on the hot path 
and reduce the cost of state tracking.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] [**Choose 
reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and 
mention them in a comment (`R: @username`).
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable. This will automatically add a link to the 
pull request in the issue. If you would like the issue to automatically close 
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   To check the build health, please visit 
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   [![Build python source distribution and 
wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python 
tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java 
tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more 
information about GitHub Actions CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to