lostluck commented on a change in pull request #15928:
URL: https://github.com/apache/beam/pull/15928#discussion_r747078645



##########
File path: sdks/go/pkg/beam/util/harnessopts/sampler.go
##########
@@ -29,10 +29,13 @@ const (
        samplePeriodHook = "beam:go:hook:dofnmetrics:sampletime"
 )
 
-// SampleInterval sets the sampling time period for DoFn metrics sampling.
+// SampleInterval sets the sampling time period (greater than 1ms) for DoFn 
metrics sampling.
 // Default value is 200ms.
 func SampleInterval(samplePeriod time.Duration) error {
-       sampleTime := strconv.FormatInt(int64(samplePeriod), 10)
+       if samplePeriod <= time.Millisecond {

Review comment:
       ```suggestion
        if samplePeriod < time.Millisecond {
   ```




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