[ 
https://issues.apache.org/jira/browse/BEAM-13001?focusedWorklogId=661075&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-661075
 ]

ASF GitHub Bot logged work on BEAM-13001:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Oct/21 17:01
            Start Date: 06/Oct/21 17:01
    Worklog Time Spent: 10m 
      Work Description: riteshghorse commented on a change in pull request 
#15657:
URL: https://github.com/apache/beam/pull/15657#discussion_r723505782



##########
File path: sdks/go/pkg/beam/core/runtime/harness/harness.go
##########
@@ -273,6 +273,54 @@ func (c *control) getOrCreatePlan(bdID bundleDescriptorID) 
(*exec.Plan, error) {
        return plan, nil
 }
 
+// Sampler provides methods for implementing state sampling
+// to track execution time metrics.
+type Sampler interface {
+       startSampler()
+       stopSampler()
+       sample()
+}
+
+// StateSampler tracks the state of a bundle.
+type StateSampler struct {
+       done  chan (int) // signal to stop sampling
+       e     *metrics.ExecutionStateTracker
+       store *metrics.Store
+       pid   string // PTransform ID
+}
+
+func newSampler(e *metrics.ExecutionStateTracker, store *metrics.Store, pid 
string) StateSampler {
+       return StateSampler{done: make(chan int), e: e, store: store, pid: pid}
+}
+
+func (s StateSampler) startSampler() {

Review comment:
       Got it.




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 661075)
    Time Spent: 0.5h  (was: 20m)

> DoFn Execution time metrics (msecs) for Go SDK
> ----------------------------------------------
>
>                 Key: BEAM-13001
>                 URL: https://issues.apache.org/jira/browse/BEAM-13001
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Ritesh Ghorse
>            Assignee: Ritesh Ghorse
>            Priority: P2
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Implement DoFn execution time metrics for Go SDK. 



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

Reply via email to