[ 
https://issues.apache.org/jira/browse/BEAM-6498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Burke resolved BEAM-6498.
--------------------------------
    Fix Version/s: Not applicable
       Resolution: Fixed

Resolved in [GitHub Pull Request 
#10654|https://github.com/apache/beam/pull/10654] instead. In particular 
counters were updated to use atomics, and the lock adds ~10ns for the other two 
types, which is fine given they do more work.

> Consider using sync/atomic for Go SDK metrics.
> ----------------------------------------------
>
>                 Key: BEAM-6498
>                 URL: https://issues.apache.org/jira/browse/BEAM-6498
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>    Affects Versions: Not applicable
>            Reporter: Robert Burke
>            Assignee: Robert Burke
>            Priority: Minor
>             Fix For: Not applicable
>
>
> Changing a portion of the metrics code to use the atomic counters might yield 
> a performance improvement and the opportunity to remove a lock or two.
> Care needs to be taken though: 
> [https://stackoverflow.com/questions/47445344/is-there-a-difference-in-go-between-a-counter-using-atomic-operations-and-one-us]
> The outcome of this task is a benchmark demonstrating the benefit (or 
> detriment) in a quasi-real situation for the Go SDK, and if warranted 
> switching metrics where possible, to use atomics.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to