)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"6953091b35cee6fe171acf0d9143149757a17d00","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  An array property called \u0027run_times\u0027 was added to this response"},{"line_number":21,"context_line":"  in order to support drawing the scatter chart on the canvas."},{"line_number":22,"context_line":"  Since there are no unqiue datetimes supplied with these run_times"},{"line_number":23,"context_line":"  the same datetime of the timedelta object was used."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"},{"line_number":26,"context_line":"  https://etherpad.openstack.org/p/qa-queens-priorities"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bf659307_7afc033e","line":23,"range":{"start_line":23,"start_character":27,"end_line":23,"end_character":42},"updated":"2018-04-06 18:06:39.000000000","message":"this object is supplied by the resolution dropdown mention aboved.","commit_id":"880df89f62ac751d74f7283ffe7b804b6c3bcc3d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"9fdbbd0ddee663cf2f2c6aedade6e02387205a95","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  An array property called \u0027run_times\u0027 was added to this response"},{"line_number":21,"context_line":"  in order to support drawing the scatter chart on the canvas."},{"line_number":22,"context_line":"  Since there are no unqiue datetimes supplied with these run_times"},{"line_number":23,"context_line":"  the same datetime of the timedelta object was used."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"},{"line_number":26,"context_line":"  https://etherpad.openstack.org/p/qa-queens-priorities"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9f6a8fd7_59708408","line":23,"updated":"2018-04-25 03:14:12.000000000","message":"So the reason this took me so long to review (aside from internal work pressures consuming my time the past couple months) is trying to understand this comment. It didn\u0027t make any sense to me coming from the perspective of what\u0027s in the DB. After taking some time to reread through the relevant code I understand why you\u0027re saying this, but this last comment isn\u0027t entirely correct. (and I found some issues because of it inline)\n\nI think the confusion stems from a misleading variable name in the private _aggregate_runs() function in api.py. That function assumes an already re-sampled set of runs. the timestamps there were unique but because of the api request were downsampled to a smaller set to make it easier for web browsers to consume. The uniqueness at the point you trying to add the run_time data is already purposefully thrown away.","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b59eaa3ffcd2230a6a1728ba4248a5e5ab173a57","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  An array property called \u0027run_times\u0027 was added to this response"},{"line_number":21,"context_line":"  in order to support drawing the scatter chart on the canvas."},{"line_number":22,"context_line":"  Since there are no unqiue datetimes supplied with these run_times"},{"line_number":23,"context_line":"  the same datetime of the timedelta object was used."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"},{"line_number":26,"context_line":"  https://etherpad.openstack.org/p/qa-queens-priorities"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9f6a8fd7_d44d31c4","line":23,"in_reply_to":"9f6a8fd7_59708408","updated":"2018-04-25 13:42:36.000000000","message":"Oh sorry that timedelta is NOT in the db. It\u0027s created from the sampling size provided by the resolution drop down.\n\nYes the uniqueness is not there, hence the statement \"Since there are no unique datetimes supplied with these run_times\"","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d8c73afb037ef37d381db3e9a7300e2079a03726","unresolved":false,"context_lines":[{"line_number":24,"context_line":"  * The db method get_run_times_time_series_grouped_by_run_metadata_key"},{"line_number":25,"context_line":"    does not allow match_key to be the same as the group_by_key so"},{"line_number":26,"context_line":"    additional filtering on the api side needed to be done in order"},{"line_number":27,"context_line":"    to draw a graph for a single job."},{"line_number":28,"context_line":"  * The methods in run_aggregator were derived from [1] and [2]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5f7c97a3_883a0333","line":27,"updated":"2018-06-28 18:44:27.000000000","message":"Do we know if there is a performance impact here for this? We\u0027ve normally tried to do most of the filtering on the DB side because in theory it should be faster.","commit_id":"34123b1cc8fb8ca1006ad7cfe111d4621557abd6"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"1567fc52169c3ac3238cede8dcdefab351ddb1fc","unresolved":false,"context_lines":[{"line_number":24,"context_line":"  * The db method get_run_times_time_series_grouped_by_run_metadata_key"},{"line_number":25,"context_line":"    does not allow match_key to be the same as the group_by_key so"},{"line_number":26,"context_line":"    additional filtering on the api side needed to be done in order"},{"line_number":27,"context_line":"    to draw a graph for a single job."},{"line_number":28,"context_line":"  * The methods in run_aggregator were derived from [1] and [2]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5f7c97a3_c299b76d","line":27,"in_reply_to":"5f7c97a3_883a0333","updated":"2018-06-28 20:02:10.000000000","message":"Yeah the dataset returned can be really large and I could see a performance impact from this. I don\u0027t have specifics but next time I upload a patch I\u0027ll try to see what my browser reports in load times and I can include the difference in those times in the commit message.","commit_id":"34123b1cc8fb8ca1006ad7cfe111d4621557abd6"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d8c73afb037ef37d381db3e9a7300e2079a03726","unresolved":false,"context_lines":[{"line_number":30,"context_line":"completes queens priority \"Job duration graph in o-h\" from:"},{"line_number":31,"context_line":"  https://etherpad.openstack.org/p/qa-queens-priorities"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"[1] https://review.openstack.org/#/c/370913/4"},{"line_number":34,"context_line":"[2] https://github.com/openstack/openstack-health/blob/4db9a614711a2e52f9c827a9340e7ff7d1882751/openstack_health/test_run_aggregator.py#L70-L90"},{"line_number":35,"context_line":"Change-Id: Ib5196d86b6b5efa0083d4aa4dd28f1fac3493560"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5f7c97a3_e8005769","line":33,"updated":"2018-06-28 18:44:27.000000000","message":"Hah, I completely forgot about this patch. I still to come back to it at some point and come up with a better way to visualize the data in that patch.","commit_id":"34123b1cc8fb8ca1006ad7cfe111d4621557abd6"}],"app/js/controllers/job.js":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b59eaa3ffcd2230a6a1728ba4248a5e5ab173a57","unresolved":false,"context_lines":[{"line_number":156,"context_line":"  vm.processRunData \u003d function(data) {"},{"line_number":157,"context_line":"    var jobMeanRunTimeEntries \u003d [];"},{"line_number":158,"context_line":"    var jobRunTimeEntries \u003d [];"},{"line_number":159,"context_line":"    for (var i \u003d 0; i \u003c data.timedelta.length; i++) {"},{"line_number":160,"context_line":"      var jobData \u003d data.timedelta[i].job_data;"},{"line_number":161,"context_line":"      if (jobData.length \u003d\u003d 1) {"},{"line_number":162,"context_line":"        jobData \u003d jobData[0];"}],"source_content_type":"text/javascript","patch_set":11,"id":"9f6a8fd7_5444c173","line":159,"range":{"start_line":159,"start_character":24,"end_line":159,"end_character":45},"updated":"2018-04-25 13:42:36.000000000","message":"here is the timedelta object I was referring to in the commit message, I will provide a line number reference and/or a link to this line.","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"}],"app/views/job.html":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"05369bd37e61f7f0b6b4ec4a871e013bbec162b4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                    granular-format\u003d\".1f| sec\"\u003e\u003c/chart-axis\u003e"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"                        \u003cchart-dataset name\u003d\"jobmeanruntime\""},{"line_number":33,"context_line":"                                       title\u003d\"Job Mean Run Time\""},{"line_number":34,"context_line":"                                       data\u003d\"job.jobMeanRunTimeEntries\"\u003e\u003c/chart-dataset\u003e"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"                        \u003cchart-canvas-line dataset\u003d\"jobmeanruntime\""}],"source_content_type":"text/html","patch_set":8,"id":"bf659307_0a204e9a","line":33,"updated":"2018-04-06 17:40:29.000000000","message":"I would probably just have this be Mean Run Time","commit_id":"1375a8528af7a48d78385d89c4fccd80476baf4a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"6953091b35cee6fe171acf0d9143149757a17d00","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                    granular-format\u003d\".1f| sec\"\u003e\u003c/chart-axis\u003e"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"                        \u003cchart-dataset name\u003d\"jobmeanruntime\""},{"line_number":33,"context_line":"                                       title\u003d\"Job Mean Run Time\""},{"line_number":34,"context_line":"                                       data\u003d\"job.jobMeanRunTimeEntries\"\u003e\u003c/chart-dataset\u003e"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"                        \u003cchart-canvas-line dataset\u003d\"jobmeanruntime\""}],"source_content_type":"text/html","patch_set":8,"id":"bf659307_da68af22","line":33,"in_reply_to":"bf659307_0a204e9a","updated":"2018-04-06 18:06:39.000000000","message":"Done","commit_id":"1375a8528af7a48d78385d89c4fccd80476baf4a"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"05369bd37e61f7f0b6b4ec4a871e013bbec162b4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                           line-width\u003d\"2\"\u003e\u003c/chart-canvas-line\u003e"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"                        \u003cchart-dataset name\u003d\"jobruntime\""},{"line_number":42,"context_line":"                                       title\u003d\"Job Run Time\""},{"line_number":43,"context_line":"                                       data\u003d\"job.jobRunTimeEntries\"\u003e\u003c/chart-dataset\u003e"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"                        \u003cchart-canvas-scatter dataset\u003d\"jobruntime\""}],"source_content_type":"text/html","patch_set":8,"id":"bf659307_8a33fef5","line":42,"updated":"2018-04-06 17:40:29.000000000","message":"Same here probably would drop Job and just have \u0027Run Time\u0027","commit_id":"1375a8528af7a48d78385d89c4fccd80476baf4a"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"6953091b35cee6fe171acf0d9143149757a17d00","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                                           line-width\u003d\"2\"\u003e\u003c/chart-canvas-line\u003e"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"                        \u003cchart-dataset name\u003d\"jobruntime\""},{"line_number":42,"context_line":"                                       title\u003d\"Job Run Time\""},{"line_number":43,"context_line":"                                       data\u003d\"job.jobRunTimeEntries\"\u003e\u003c/chart-dataset\u003e"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"                        \u003cchart-canvas-scatter dataset\u003d\"jobruntime\""}],"source_content_type":"text/html","patch_set":8,"id":"bf659307_7a75e3f9","line":42,"in_reply_to":"bf659307_8a33fef5","updated":"2018-04-06 18:06:39.000000000","message":"Done","commit_id":"1375a8528af7a48d78385d89c4fccd80476baf4a"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"3a173dad29584e3d5c9a347c04d3c8eb1cb37602","unresolved":false,"context_lines":[{"line_number":21,"context_line":"                    \u003ch3 class\u003d\"panel-title\"\u003eJob Run Time\u003c/h3\u003e"},{"line_number":22,"context_line":"                \u003c/div\u003e"},{"line_number":23,"context_line":"                \u003cdiv class\u003d\"panel-body\"\u003e"},{"line_number":24,"context_line":"                    \u003cchart width\u003d\"100%\" height\u003d\"450px\"\u003e"},{"line_number":25,"context_line":"                        \u003cchart-axis name\u003d\"x\" type\u003d\"time\" path\u003d\".x\" opposes\u003d\"y\""},{"line_number":26,"context_line":"                                    align\u003d\"bottom\" orient\u003d\"horizontal\" draw\u003d\"true\""},{"line_number":27,"context_line":"                                    granular-format\u003d\"%x %X\"\u003e\u003c/chart-axis\u003e"}],"source_content_type":"text/html","patch_set":10,"id":"bf659307_79c6f89c","line":24,"updated":"2018-04-11 09:26:19.000000000","message":"Do we really need this height? The other graphs are 250px in this page, though.","commit_id":"880df89f62ac751d74f7283ffe7b804b6c3bcc3d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"d738876dad753b05668c2ae254bf9b61e376f948","unresolved":false,"context_lines":[{"line_number":21,"context_line":"                    \u003ch3 class\u003d\"panel-title\"\u003eJob Run Time\u003c/h3\u003e"},{"line_number":22,"context_line":"                \u003c/div\u003e"},{"line_number":23,"context_line":"                \u003cdiv class\u003d\"panel-body\"\u003e"},{"line_number":24,"context_line":"                    \u003cchart width\u003d\"100%\" height\u003d\"450px\"\u003e"},{"line_number":25,"context_line":"                        \u003cchart-axis name\u003d\"x\" type\u003d\"time\" path\u003d\".x\" opposes\u003d\"y\""},{"line_number":26,"context_line":"                                    align\u003d\"bottom\" orient\u003d\"horizontal\" draw\u003d\"true\""},{"line_number":27,"context_line":"                                    granular-format\u003d\"%x %X\"\u003e\u003c/chart-axis\u003e"}],"source_content_type":"text/html","patch_set":10,"id":"bf659307_a3d0da20","line":24,"in_reply_to":"bf659307_79c6f89c","updated":"2018-04-11 12:53:33.000000000","message":"I copied the same style from the tests page.  I think the reason for this height is the runtimes can be a really high value sometimes. I didn\u0027t try any other size, I can change this to 250 and if there are no problems i\u0027ll upload another patch as it would bring consistency to the page. Good catch.","commit_id":"880df89f62ac751d74f7283ffe7b804b6c3bcc3d"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"d6d95633c08c1d74c3d3b3b1d00a19b2022b26d8","unresolved":false,"context_lines":[{"line_number":21,"context_line":"                    \u003ch3 class\u003d\"panel-title\"\u003eJob Run Time\u003c/h3\u003e"},{"line_number":22,"context_line":"                \u003c/div\u003e"},{"line_number":23,"context_line":"                \u003cdiv class\u003d\"panel-body\"\u003e"},{"line_number":24,"context_line":"                    \u003cchart width\u003d\"100%\" height\u003d\"450px\"\u003e"},{"line_number":25,"context_line":"                        \u003cchart-axis name\u003d\"x\" type\u003d\"time\" path\u003d\".x\" opposes\u003d\"y\""},{"line_number":26,"context_line":"                                    align\u003d\"bottom\" orient\u003d\"horizontal\" draw\u003d\"true\""},{"line_number":27,"context_line":"                                    granular-format\u003d\"%x %X\"\u003e\u003c/chart-axis\u003e"}],"source_content_type":"text/html","patch_set":10,"id":"bf659307_1737794f","line":24,"in_reply_to":"bf659307_a3d0da20","updated":"2018-04-11 16:51:28.000000000","message":"No problem with this change as far as i could tell. Thanks for pointing it out :)","commit_id":"880df89f62ac751d74f7283ffe7b804b6c3bcc3d"}],"openstack_health/api.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"9fdbbd0ddee663cf2f2c6aedade6e02387205a95","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            amount_of_success \u003d _calc_amount_of_successful_runs(runs)"},{"line_number":341,"context_line":"            amount_of_failures \u003d _calc_amount_of_failed_runs(runs)"},{"line_number":342,"context_line":"            run_times \u003d list(map(itemgetter(\u0027run_time\u0027), runs))"},{"line_number":343,"context_line":"            avg_runtime \u003d sum(run_times) / len(runs)"},{"line_number":344,"context_line":"            job_data.append({\u0027fail\u0027: amount_of_failures,"},{"line_number":345,"context_line":"                             \u0027pass\u0027: amount_of_success,"},{"line_number":346,"context_line":"                             \u0027run_times\u0027: run_times,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_b4ca079e","line":343,"updated":"2018-04-25 03:14:12.000000000","message":"So this part isn\u0027t quite right, there are actually a few issues here.\n\nFirst this data is already aggregated (sort of) so we don\u0027t actually have multiple runs at the timestamp here. It\u0027s actually just an artifact of not expecting this data to be treated as a proper time series when we did the aggregation so at the output formatting time (this function) we\u0027re not handling it properly. This means that what you\u0027re using as run_times in the graphing should actually be avg_runtime. The average in the graphs actually should be a moving average over the series of the averages per time stamp here. The reason for this is the aggregation step is just a resampling intended to shrink the data size we\u0027re dealing with. We can have a lot of test data in the graphs and if we didn\u0027t downsample it our browsers start to cry trying to render all that data.\n\nThe second aspect is that how are we handling missing data. This function takes in an aggregated runs table data which has uniform timestamps, but if there is no data for a particular timestamp that entry in the dictionary is just []. However, when graphing if we don\u0027t account for each uniform time stamp these discontinuities can mess with continuous lines since it tries to interpolate. (This is only an issue for the average line graph)\n\nThe last aspect is failed runs. When it comes to graphing run time we normally don\u0027t want to look at failed runs. They represent outliers and can significantly throw off any graphs. We don\u0027t want to include any data in the run time graphs from a failed run.\n\nI\u0027d recommend taking a look at how we do the data preparation for the time series for the tests view from test_runs data here:\n\n https://github.com/openstack/openstack-health/blob/master/openstack_health/test_run_aggregator.py#L70-L90\n\nWhile not 100% the same it gives you an idea of how we should be preparing the output data from the api for the js to consume and graph.\n\nFor this section I don\u0027t have any strong feelings about exactly how we should be formatting things. But I do like the way we have the numeric timeseries data separated on the test runs side and just treat it separately. This lets you use pandas, which makes some of the math operations on the time series much simpler (and a bit faster, since it calls out to c via numpy) That might be a good fit for this side too, but I won\u0027t say it\u0027s a requirement.","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b59eaa3ffcd2230a6a1728ba4248a5e5ab173a57","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            amount_of_success \u003d _calc_amount_of_successful_runs(runs)"},{"line_number":341,"context_line":"            amount_of_failures \u003d _calc_amount_of_failed_runs(runs)"},{"line_number":342,"context_line":"            run_times \u003d list(map(itemgetter(\u0027run_time\u0027), runs))"},{"line_number":343,"context_line":"            avg_runtime \u003d sum(run_times) / len(runs)"},{"line_number":344,"context_line":"            job_data.append({\u0027fail\u0027: amount_of_failures,"},{"line_number":345,"context_line":"                             \u0027pass\u0027: amount_of_success,"},{"line_number":346,"context_line":"                             \u0027run_times\u0027: run_times,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_0a3e22c0","line":343,"in_reply_to":"9f6a8fd7_b4ca079e","updated":"2018-04-25 13:42:36.000000000","message":"First part: I\u0027ll track down the source of a proper time series and apply a moving average in a way that is similar to the link provided above/\n\nSecond part: I\u0027ll double check what happens on empty data sets (specifically for a particular timestamp) and try to handle erroneous cases.\n\nThird part: Removing failed runs is a good point. This should be simple since the method for calculating failed runs is already there.\n\nI hope I got all that right, thanks for off-hours review, sorry things are so tight for you right now :(","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"b59eaa3ffcd2230a6a1728ba4248a5e5ab173a57","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            amount_of_success \u003d _calc_amount_of_successful_runs(runs)"},{"line_number":341,"context_line":"            amount_of_failures \u003d _calc_amount_of_failed_runs(runs)"},{"line_number":342,"context_line":"            run_times \u003d list(map(itemgetter(\u0027run_time\u0027), runs))"},{"line_number":343,"context_line":"            avg_runtime \u003d sum(run_times) / len(runs)"},{"line_number":344,"context_line":"            job_data.append({\u0027fail\u0027: amount_of_failures,"},{"line_number":345,"context_line":"                             \u0027pass\u0027: amount_of_success,"},{"line_number":346,"context_line":"                             \u0027run_times\u0027: run_times,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_f7b87711","line":343,"in_reply_to":"9f6a8fd7_b4ca079e","updated":"2018-04-25 13:42:36.000000000","message":"ok i will try to address the three points. 1. get accurate run time info 2. catch empty timestamp entries and remove them. 3. Ensure failed runs are not included.\n\nSince I was using an already tested/approved method I thought this would be accounted for","commit_id":"9f6cd3262f32833f5052e1c7ffef13e539593bf7"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d8c73afb037ef37d381db3e9a7300e2079a03726","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            match_value \u003d None"},{"line_number":382,"context_line":"        run_times \u003d api.get_run_times_time_series_grouped_by_run_metadata_key("},{"line_number":383,"context_line":"            group_by_key, start_date\u003dstart_date, stop_date\u003dstop_date,"},{"line_number":384,"context_line":"            session\u003dsession, match_key\u003dmatch_key, match_value\u003dmatch_value)"},{"line_number":385,"context_line":"        numeric \u003d None"},{"line_number":386,"context_line":"        # if the match_key is not provided to the db call we have to filter"},{"line_number":387,"context_line":"        # out the entries that do not belong in the grouping."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_93cc7863","line":384,"updated":"2018-06-28 18:44:27.000000000","message":"Is there an advantage here to making a second DB call vs just manipulating the data above from L370. That dict runs should have the same set of data as what\u0027s being returned here just not in an ideal format for building a pandas time series with.\n\nBasically I\u0027m just asking why you decided to query the DB  again instead of just building a second time series dict for the numeric aggregation by looping over runs. I don\u0027t know which way is better, but my gut feeling is that a second query will be slower given the amount of data we can have in the DB.","commit_id":"34123b1cc8fb8ca1006ad7cfe111d4621557abd6"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"1567fc52169c3ac3238cede8dcdefab351ddb1fc","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            match_value \u003d None"},{"line_number":382,"context_line":"        run_times \u003d api.get_run_times_time_series_grouped_by_run_metadata_key("},{"line_number":383,"context_line":"            group_by_key, start_date\u003dstart_date, stop_date\u003dstop_date,"},{"line_number":384,"context_line":"            session\u003dsession, match_key\u003dmatch_key, match_value\u003dmatch_value)"},{"line_number":385,"context_line":"        numeric \u003d None"},{"line_number":386,"context_line":"        # if the match_key is not provided to the db call we have to filter"},{"line_number":387,"context_line":"        # out the entries that do not belong in the grouping."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_62cb0373","line":384,"in_reply_to":"5f7c97a3_93cc7863","updated":"2018-06-28 20:02:10.000000000","message":"Gooood question! I think its possible to make one DB call, I just need to check for fails\u003d\u003d0 and pass\u003e0. Let me update the patchset as that would improve the performance. Since I\u0027m not filtering with the match_key value this 2nd call returns a large data set and after checking the datetime and run_time values appears to be redundant.\n\nThis implementation was influenced by your WIP patch, which also made a 2nd db call, I was convinced by that it was the way to go.","commit_id":"34123b1cc8fb8ca1006ad7cfe111d4621557abd6"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"63e0673d2633328bee8f6a7f182c4392d2bffb39","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                else:"},{"line_number":385,"context_line":"                    run_times[run_at] \u003d {build_name: [run[\u0027run_time\u0027]]}"},{"line_number":386,"context_line":"        # if there is more than one run with the same run_at time"},{"line_number":387,"context_line":"        # and run_metadata_value just average the results."},{"line_number":388,"context_line":"        for run_at, run_time_data in run_times.items():"},{"line_number":389,"context_line":"            for build_name, times in run_time_data.items():"},{"line_number":390,"context_line":"                if len(times) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_4380329d","line":387,"range":{"start_line":387,"start_character":14,"end_line":387,"end_character":32},"updated":"2018-06-29 18:53:09.000000000","message":"this should be build_name","commit_id":"a257a45df0ec3fa39164dd72c10a94219de20477"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"71694f409dbbc85f9bb0ec8a7531d3604c0e3404","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        for run_at, run_time_data in run_times.items():"},{"line_number":389,"context_line":"            for build_name, times in run_time_data.items():"},{"line_number":390,"context_line":"                if len(times) \u003e 1:"},{"line_number":391,"context_line":"                    run_times[run_at][build_name] \u003d sum("},{"line_number":392,"context_line":"                        times) / len(times)"},{"line_number":393,"context_line":"                else:"},{"line_number":394,"context_line":"                    run_times[run_at][build_name] \u003d times[0]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_63244e61","line":391,"updated":"2018-06-29 18:15:29.000000000","message":"I would have used numpy.mean() here just to clean up the line a bit since we already have it in the requirements file.","commit_id":"a257a45df0ec3fa39164dd72c10a94219de20477"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"63e0673d2633328bee8f6a7f182c4392d2bffb39","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        for run_at, run_time_data in run_times.items():"},{"line_number":389,"context_line":"            for build_name, times in run_time_data.items():"},{"line_number":390,"context_line":"                if len(times) \u003e 1:"},{"line_number":391,"context_line":"                    run_times[run_at][build_name] \u003d sum("},{"line_number":392,"context_line":"                        times) / len(times)"},{"line_number":393,"context_line":"                else:"},{"line_number":394,"context_line":"                    run_times[run_at][build_name] \u003d times[0]"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_230ad626","line":391,"in_reply_to":"5f7c97a3_63244e61","updated":"2018-06-29 18:53:09.000000000","message":"Done","commit_id":"a257a45df0ec3fa39164dd72c10a94219de20477"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"71694f409dbbc85f9bb0ec8a7531d3604c0e3404","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                if len(times) \u003e 1:"},{"line_number":391,"context_line":"                    run_times[run_at][build_name] \u003d sum("},{"line_number":392,"context_line":"                        times) / len(times)"},{"line_number":393,"context_line":"                else:"},{"line_number":394,"context_line":"                    run_times[run_at][build_name] \u003d times[0]"},{"line_number":395,"context_line":"        numeric \u003d run_aggregator.get_numeric_data("},{"line_number":396,"context_line":"            run_times, datetime_resolution)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_a3cfc689","line":393,"updated":"2018-06-29 18:15:29.000000000","message":"FWIW, you don\u0027t need this condition, the mean of a single entry list is the single entry","commit_id":"a257a45df0ec3fa39164dd72c10a94219de20477"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"63e0673d2633328bee8f6a7f182c4392d2bffb39","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                if len(times) \u003e 1:"},{"line_number":391,"context_line":"                    run_times[run_at][build_name] \u003d sum("},{"line_number":392,"context_line":"                        times) / len(times)"},{"line_number":393,"context_line":"                else:"},{"line_number":394,"context_line":"                    run_times[run_at][build_name] \u003d times[0]"},{"line_number":395,"context_line":"        numeric \u003d run_aggregator.get_numeric_data("},{"line_number":396,"context_line":"            run_times, datetime_resolution)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8313aa65","line":393,"in_reply_to":"5f7c97a3_a3cfc689","updated":"2018-06-29 18:53:09.000000000","message":"Done","commit_id":"a257a45df0ec3fa39164dd72c10a94219de20477"}]}
