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

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

                Author: ASF GitHub Bot
            Created on: 14/May/22 01:58
            Start Date: 14/May/22 01:58
    Worklog Time Spent: 10m 
      Work Description: damccorm commented on code in PR #17673:
URL: https://github.com/apache/beam/pull/17673#discussion_r872912707


##########
sdks/go/test/load/sideinput/sideinput.go:
##########
@@ -51,11 +54,17 @@ func parseSyntheticConfig() synthetic.SourceConfig {
        }
 }
 
+// impToKV just turns an impulse signal into a KV instead of
+// adding a single value input version of RuntimeMonitor
+func impToKV(imp []byte, emit func([]byte, []byte)) {
+       emit(imp, imp)
+}
+
 type doFn struct {

Review Comment:
   I know this predates the change, but would you mind giving this a meaningful 
name? Maybe something like firstNKVPairs



##########
sdks/go/test/load/util.go:
##########
@@ -132,10 +133,16 @@ func newLoadTestResult(value float64) loadTestResult {
 // PublishMetrics calculates the runtime and sends the result to InfluxDB 
database.
 func PublishMetrics(results metrics.QueryResults) {
        options := newInfluxDBOptions()
-       if options.validate() {
-               if res := toLoadTestResults(results); len(res) > 0 {
-                       publishMetricstoInfluxDB(options, 
toLoadTestResults(results))
-               }
+       ress := toLoadTestResults(results)
+       for _, res := range ress {
+               log.Printf("%s %v", res.metric, 
time.Duration(float64(time.Second)*res.value))
+       }
+       if len(ress) == 0 {
+               log.Print("No metrics returned.")
+               return
+       }
+       if options.validate() && len(ress) > 0 {

Review Comment:
   ```suggestion
        if options.validate() {
   ```
   
   We've already early returned in this case so we probably don't need this. If 
you want to be extra explicit you can put it in the else (I'd just cut the 
extra clause though)





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

    Worklog Id:     (was: 770455)
    Time Spent: 50m  (was: 40m)

> Optimize load tests w/generic registrations
> -------------------------------------------
>
>                 Key: BEAM-14470
>                 URL: https://issues.apache.org/jira/browse/BEAM-14470
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go, testing
>            Reporter: Robert Burke
>            Assignee: Robert Burke
>            Priority: P2
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> With Generic Registration available, a way to indicate the value would be via 
> the load tests.
> In particular the following tests should be optimized:
> http://metrics.beam.apache.org/d/fK0U4JqWz/cogbk-load-tests?orgId=1&var-processingType=batch&var-sdk=go
> http://metrics.beam.apache.org/d/WNzYt13Zk/combine-load-tests?orgId=1&var-processingType=batch&var-sdk=go
> http://metrics.beam.apache.org/d/UYZ-oJ3Zk/gbk-load-tests?orgId=1&var-processingType=batch&var-sdk=go
> http://metrics.beam.apache.org/d/MOi-kf3Zk/pardo-load-tests?orgId=1&var-processingType=batch&var-sdk=go
> http://metrics.beam.apache.org/d/-E9aGlFGk/side-input-load-tests?orgId=1&var-processingType=batch&var-sdk=go
> Benchmarks show reduce per call overhead by about ~300ns per parameter in the 
> invoked user function, just like the code generated, and any improvement 
> should be reflected by the  load test graphs going forward.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to