lostluck commented on code in PR #17673:
URL: https://github.com/apache/beam/pull/17673#discussion_r873082268


##########
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:
   Nice catch. Nah, no metrics means it doesn't mean anything for the DB 
options to be correct or not.



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