[ https://issues.apache.org/jira/browse/BEAM-6229?focusedWorklogId=175374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-175374 ]
ASF GitHub Bot logged work on BEAM-6229: ---------------------------------------- Author: ASF GitHub Bot Created on: 14/Dec/18 15:24 Start Date: 14/Dec/18 15:24 Worklog Time Spent: 10m Work Description: lgajowy closed pull request #7283: [BEAM-6229] Fix LoadTestResult to store propoer timestamp and runtime URL: https://github.com/apache/beam/pull/7283 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/ConsoleResultPublisher.java b/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/ConsoleResultPublisher.java index c9eba52ca86a..789ae51d1617 100644 --- a/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/ConsoleResultPublisher.java +++ b/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/ConsoleResultPublisher.java @@ -22,6 +22,6 @@ static void publish(LoadTestResult result) { System.out.println(String.format("Total bytes: %s", result.getTotalBytesCount())); - System.out.println(String.format("Total time (millis): %s", result.getRuntime())); + System.out.println(String.format("Total time (sec): %s", result.getRuntime())); } } diff --git a/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/LoadTestResult.java b/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/LoadTestResult.java index b09ce882617f..705d14eccd41 100644 --- a/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/LoadTestResult.java +++ b/sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/LoadTestResult.java @@ -39,12 +39,12 @@ private LoadTestResult(Long timestamp, Long runtime, Long totalBytesCount) { } /** Constructs {@link LoadTestResult} from {@link PipelineResult}. */ - static LoadTestResult create(PipelineResult result, String namespace, long now) { + static LoadTestResult create(PipelineResult result, String namespace, long nowInMillis) { MetricsReader reader = new MetricsReader(result, namespace); return new LoadTestResult( - now, - reader.getEndTimeMetric("runtime") - reader.getStartTimeMetric("runtime"), + nowInMillis / 1000, + (reader.getEndTimeMetric("runtime") - reader.getStartTimeMetric("runtime")) / 1000, reader.getCounterMetric("totalBytes.count")); } @@ -61,7 +61,7 @@ public Long getTotalBytesCount() { return ImmutableMap.<String, Object>builder() .put("timestamp", timestamp) .put("runtime", runtime) - .put("totalBytesCount", totalBytesCount) + .put("total_bytes_count", totalBytesCount) .build(); } } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 175374) Time Spent: 0.5h (was: 20m) > BigQuery returns value error while retrieving load test metrics > --------------------------------------------------------------- > > Key: BEAM-6229 > URL: https://issues.apache.org/jira/browse/BEAM-6229 > Project: Beam > Issue Type: Bug > Components: testing > Reporter: Kasia Kucharczyk > Assignee: Lukasz Gajowy > Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > GroupByKeyLoadTest run on Dataflow saves the timestamp metric is saved in the > wrong format: > {code} > Cannot return an invalid timestamp value of 1544720666515000064 microseconds > relative to the Unix epoch. The range of valid timestamp values is [0001-01-1 > 00:00:00, 9999-12-31 23:59:59.999999]; error in writing field timestamp > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)