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

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

                Author: ASF GitHub Bot
            Created on: 25/Jul/19 10:03
            Start Date: 25/Jul/19 10:03
    Worklog Time Spent: 10m 
      Work Description: kkucharc commented on pull request #8941: [BEAM-7528] 
Save load test metrics according to distribution name
URL: https://github.com/apache/beam/pull/8941#discussion_r307216382
 
 

 ##########
 File path: 
sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py
 ##########
 @@ -111,11 +112,15 @@ def _prepare_all_metrics(self, metrics):
       insert_rows.append(counter_dict)
 
     dists = metrics['distributions']
-    if len(dists) > 0:
-      runtime = RuntimeMetric(dists, submit_timestamp, metric_id)\
-        .as_dict()
-      insert_rows.append(runtime)
-
+    sorted_dists = sorted(dists, key=lambda x: x.key.metric.name)
 
 Review comment:
   This is good advice Kamil, thank you. But I must agree with Valentyn. 
Because of rather small arrays we won't get much out of performance by using 
`attrgetter` and as I checked how it would look like it may be a little bit 
less readable.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 282574)
    Time Spent: 5.5h  (was: 5h 20m)

> Save correctly Python Load Tests metrics according to it's namespace
> --------------------------------------------------------------------
>
>                 Key: BEAM-7528
>                 URL: https://issues.apache.org/jira/browse/BEAM-7528
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: Kasia Kucharczyk
>            Assignee: Kasia Kucharczyk
>            Priority: Major
>          Time Spent: 5.5h
>  Remaining Estimate: 0h
>
> Bug discovered when metrics monitored more than one distribution and saved 
> all as `runtime`.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to