You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Robert Burke (JIRA)" <ji...@apache.org> on 2019/01/29 21:25:00 UTC

[jira] [Comment Edited] (BEAM-6498) Consider using sync/atomic for Go SDK metrics.

    [ https://issues.apache.org/jira/browse/BEAM-6498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755393#comment-16755393 ] 

Robert Burke edited comment on BEAM-6498 at 1/29/19 9:24 PM:
-------------------------------------------------------------

[https://gobyexample.com/atomic-counters]  and [https://www.youtube.com/watch?v=1V7eJ0jN8-E] are nice resources for this.

Concern in particular is for the Gauge and Distribution types which have multiple values. Is it safe/faster to use sync/atomic on those?


was (Author: lostluck):
[https://gobyexample.com/atomic-counters]  and [https://www.youtube.com/watch?v=1V7eJ0jN8-E] are nice resources for this.

Concern in particular is for the Gauge and Distribution types which have multiple values. Is it safe/faster to use those?

> 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
>            Priority: Minor
>
> 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
(v7.6.3#76005)