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

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

                Author: ASF GitHub Bot
            Created on: 11/Jan/19 17:00
            Start Date: 11/Jan/19 17:00
    Worklog Time Spent: 10m 
      Work Description: lgajowy commented on pull request #7458: [BEAM-6290] 
Generic schema for metrics 
URL: https://github.com/apache/beam/pull/7458#discussion_r247186731
 
 

 ##########
 File path: 
sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/ConsoleResultPublisher.java
 ##########
 @@ -17,11 +17,22 @@
  */
 package org.apache.beam.sdk.loadtests;
 
-/** Writes {@link LoadTestResult} to console. */
-public class ConsoleResultPublisher {
+import static java.lang.String.format;
 
-  static void publish(LoadTestResult result) {
-    System.out.println(String.format("Total bytes: %s", 
result.getTotalBytesCount()));
-    System.out.println(String.format("Total time (sec): %s", 
result.getRuntime()));
+import java.util.List;
+import org.apache.beam.sdk.testutils.NamedTestResult;
+
+/** Writes load test metrics results to console. */
+class ConsoleResultPublisher {
+
+  static void publish(List<NamedTestResult> results, String testId, String 
timestamp) {
 
 Review comment:
   This is true. I figured it will be better to pass those as parameters rather 
than read from one of many records from the list. 
 
----------------------------------------------------------------
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:
[email protected]


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

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

> Make the schema for BQ tables storing metric results more generic (JAVA)
> ------------------------------------------------------------------------
>
>                 Key: BEAM-6290
>                 URL: https://issues.apache.org/jira/browse/BEAM-6290
>             Project: Beam
>          Issue Type: Sub-task
>          Components: testing
>            Reporter: Lukasz Gajowy
>            Assignee: Lukasz Gajowy
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, we keep the metrics results in BQ in tables with a schema like 
> this: 
> timestamp | total_bytes | run_time | (possibly other BQ columns)
> every time we want to add a new column the schema has to be extended. This is 
> not convenient given the fact that any load test can have different metrics 
> stored. This in turn would cause multiple BQ tables each queried differently. 
> We can provide a more generic schema, like so: 
> test_id | timestamp | metric | value
> thanks to that, every metric, whatever it's name is, can be saved in the 
> table as a separate row. This gives more elasticity in storing metrics and is 
> still easy to query and plot.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to