)]}'
{"monasca_tempest_tests/tests/api/constants.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"MAX_RETRIES \u003d 30"},{"line_number":16,"context_line":"RETRY_TIMEOUT_SECS \u003d 1"},{"line_number":17,"context_line":"ONE_MINUTE_TIME_OUT \u003d 60"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"MAX_METRIC_NAME_LENGTH \u003d 255"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_98f6cbf7","line":16,"updated":"2015-11-11 03:59:01.000000000","message":"Can you change the name to RETRY_WAIT_SECS. I was going to do this in the review I have up, but didn\u0027t change yet.\n\nRETRY_TIMEOUT_SECS is just a little misleading as Craig points out in my review, although I don\u0027t particularly like the verbose name that he used either. I think this is a nice compromise.\n\nSorry, this was my fault.","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"}],"monasca_tempest_tests/tests/api/helpers.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                break"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def timestamp_to_time_iso(timestamp, microsecond\u003dTrue):"},{"line_number":209,"context_line":"    time_iso \u003d timeutils.iso8601_from_timestamp(timestamp / 1000., microsecond)"},{"line_number":210,"context_line":"    return time_iso"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_783f6787","line":208,"updated":"2015-11-11 03:59:01.000000000","message":"Might consider shortening name to timestamp_to_iso as you are going to use this in a lot of places and this is just a bit long.","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def timestamp_to_time_iso(timestamp, microsecond\u003dTrue):"},{"line_number":209,"context_line":"    time_iso \u003d timeutils.iso8601_from_timestamp(timestamp / 1000., microsecond)"},{"line_number":210,"context_line":"    return time_iso"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_b88aaf19","line":209,"updated":"2015-11-11 03:59:01.000000000","message":"I was just wondering if 1000. is clear or Pythonic enough. I don\u0027t know the correct answer, but I\u0027m wondering if that . cloud get lost as some point. It is a bit difficult to see. could do float(1000) or 1000.0. Just an idea.","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"def timestamp_to_time_iso(timestamp, microsecond\u003dTrue):"},{"line_number":209,"context_line":"    time_iso \u003d timeutils.iso8601_from_timestamp(timestamp / 1000., microsecond)"},{"line_number":210,"context_line":"    return time_iso"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def timestamp_to_time_iso_millisecond(timestamp, microsecond\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_f85357e0","line":210,"updated":"2015-11-11 03:59:01.000000000","message":"You could turn this into a one-liner by\n\nreturn timeutils.iso8601...","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    return time_iso"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"def timestamp_to_time_iso_millisecond(timestamp, microsecond\u003dTrue):"},{"line_number":214,"context_line":"    time_iso \u003d timeutils.iso8601_from_timestamp(timestamp / 1000., microsecond)"},{"line_number":215,"context_line":"    time_iso, time_iso_decimal \u003d time_iso.split(\".\", 1)"},{"line_number":216,"context_line":"    date_hour, minute, second \u003d time_iso.split(\":\", 2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_b8394fa6","line":213,"updated":"2015-11-11 03:59:01.000000000","message":"Might shorten name to timestamp_to_iso_millis","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    millisecond \u003d str(int(second2) + float(\u0027.\u0027 + time_iso_decimal[0:3]))"},{"line_number":220,"context_line":"    time_iso_new \u003d date_hour + \u0027:\u0027 + minute + \u0027:\u0027 + second1 + millisecond"},{"line_number":221,"context_line":"    time_iso_millisecond \u003d time_iso_new + \u0027Z\u0027"},{"line_number":222,"context_line":"    return time_iso_millisecond"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_98cd6bb9","line":222,"updated":"2015-11-11 03:59:01.000000000","message":"I think there is a better way to do this conversion.","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"bd25c999f4b452088c800131fd92a343be48fdfb","unresolved":false,"context_lines":[{"line_number":210,"context_line":"def timestamp_to_iso(timestamp):"},{"line_number":211,"context_line":"    time_utc \u003d datetime.datetime.utcfromtimestamp(timestamp / 1000.0)"},{"line_number":212,"context_line":"    time_iso_microsecond \u003d datetime.datetime.isoformat(time_utc)"},{"line_number":213,"context_line":"    time_iso, time_iso_decimals \u003d time_iso_microsecond.split(\".\", 1)"},{"line_number":214,"context_line":"    time_iso +\u003d \u0027Z\u0027"},{"line_number":215,"context_line":"    return time_iso"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_a203c80c","line":213,"updated":"2015-11-13 13:15:40.000000000","message":"This will raise a ValueError if timestamp is for an integer number of seconds (as time_iso does not format with microseconds on the end in that case)","commit_id":"fec31aa07f65df4a28e1f9a8404e58d9bb6fed52"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"86599e82aca5a57bbe1b94b6250316f35ed9ee87","unresolved":false,"context_lines":[{"line_number":210,"context_line":"def timestamp_to_iso(timestamp):"},{"line_number":211,"context_line":"    time_utc \u003d datetime.datetime.utcfromtimestamp(timestamp / 1000.0)"},{"line_number":212,"context_line":"    time_iso_microsecond \u003d datetime.datetime.isoformat(time_utc)"},{"line_number":213,"context_line":"    time_iso, time_iso_decimals \u003d time_iso_microsecond.split(\".\", 1)"},{"line_number":214,"context_line":"    time_iso +\u003d \u0027Z\u0027"},{"line_number":215,"context_line":"    return time_iso"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_d5d47a48","line":213,"in_reply_to":"da85f559_a203c80c","updated":"2015-11-13 17:52:32.000000000","message":"Thank you for pointing this out! Yes, if microsecond \u003d 000000, the isoformat output will not have the microsecond part which will definitely lead to an error when I try to use split.","commit_id":"fec31aa07f65df4a28e1f9a8404e58d9bb6fed52"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"bd25c999f4b452088c800131fd92a343be48fdfb","unresolved":false,"context_lines":[{"line_number":218,"context_line":"def timestamp_to_iso_millis(timestamp):"},{"line_number":219,"context_line":"    time_utc \u003d datetime.datetime.utcfromtimestamp(timestamp / 1000.0)"},{"line_number":220,"context_line":"    time_iso_microsecond \u003d datetime.datetime.isoformat(time_utc)"},{"line_number":221,"context_line":"    time_iso, time_iso_decimal \u003d time_iso_microsecond.split(\".\", 1)"},{"line_number":222,"context_line":"    date_hour, minute, second \u003d time_iso.split(\":\", 2)"},{"line_number":223,"context_line":"    second1 \u003d second[0]"},{"line_number":224,"context_line":"    second2 \u003d second[1]"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_8736d6b2","line":221,"updated":"2015-11-13 13:15:40.000000000","message":"Again, this will raise a ValueError if timestamp is for an integer number of seconds (as time_iso does not format with microseconds on the end in that case)","commit_id":"fec31aa07f65df4a28e1f9a8404e58d9bb6fed52"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"bd25c999f4b452088c800131fd92a343be48fdfb","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    second2 \u003d second[1]"},{"line_number":225,"context_line":"    millisecond \u003d str(int(second2) + float(\u0027.\u0027 + time_iso_decimal[0:3]))"},{"line_number":226,"context_line":"    time_iso_new \u003d date_hour + \u0027:\u0027 + minute + \u0027:\u0027 + second1 + millisecond"},{"line_number":227,"context_line":"    time_iso_millisecond \u003d time_iso_new + \u0027Z\u0027"},{"line_number":228,"context_line":"    return time_iso_millisecond"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_67a3b250","line":227,"updated":"2015-11-13 13:15:40.000000000","message":"Couldn\u0027t you simplify this entire method to something like\n\n    time_utc \u003d datetime.datetime.utcfromtimestamp(timestamp / 1000.0)\n    time_iso_base \u003d time_utc.strftime(\"%Y-%m-%dT%H:%M:%S\")\n    milliseconds \u003d time_utc.microseconds\n    return \"%s.%03dZ\" % (time_iso_base, time_utc.microsecond / 1000)\n\n?","commit_id":"fec31aa07f65df4a28e1f9a8404e58d9bb6fed52"},{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"86599e82aca5a57bbe1b94b6250316f35ed9ee87","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    second2 \u003d second[1]"},{"line_number":225,"context_line":"    millisecond \u003d str(int(second2) + float(\u0027.\u0027 + time_iso_decimal[0:3]))"},{"line_number":226,"context_line":"    time_iso_new \u003d date_hour + \u0027:\u0027 + minute + \u0027:\u0027 + second1 + millisecond"},{"line_number":227,"context_line":"    time_iso_millisecond \u003d time_iso_new + \u0027Z\u0027"},{"line_number":228,"context_line":"    return time_iso_millisecond"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_3595c63f","line":227,"in_reply_to":"da85f559_67a3b250","updated":"2015-11-13 17:52:32.000000000","message":"I agree with you but since java api will drop the last 0 in microsecond, %03 will cause some error. For example, when time_iso \u003d \u00272015-11-13T15:59:31.820000\u0027, the output we want is \u00272015-11-13T15:59:31.82Z\u0027 instead of \u00272015-11-13T15:59:31.820Z\u0027.","commit_id":"fec31aa07f65df4a28e1f9a8404e58d9bb6fed52"}],"monasca_tempest_tests/tests/api/test_metrics.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8a8a4e01bf4f8ec350e11b2be8d4b44301fa21f6","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        cls._name \u003d name"},{"line_number":50,"context_line":"        cls._key \u003d key"},{"line_number":51,"context_line":"        cls._value \u003d value"},{"line_number":52,"context_line":"        cls._time_iso \u003d time_iso"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        timestamp2 \u003d int(time.time() * 1000 + 6000)"},{"line_number":55,"context_line":"        time_iso_millisecond2 \u003d helpers.timestamp_to_time_iso_millisecond("}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_f80117b0","line":52,"updated":"2015-11-11 03:59:01.000000000","message":"Something to consider here is to add the prefix _test, as in _test_metric and _test_name, or something else to identify that this is the subject of your tests.","commit_id":"c3d747eb4dd0e5e219e0aed27af1c327a00a4aa3"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"7caa7886ae81a67280f25ad998277cb8ea7df853","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        time_iso_millisecond \u003d helpers.timestamp_to_iso_millis(timestamp)"},{"line_number":39,"context_line":"        metric_value \u003d 1.23"},{"line_number":40,"context_line":"        meta_key \u003d data_utils.rand_name(\u0027meta_key\u0027)"},{"line_number":41,"context_line":"        meta_value \u003d data_utils.rand_name(\u0027meta_value\u0027)"},{"line_number":42,"context_line":"        metric \u003d helpers.create_metric(name\u003dname,"},{"line_number":43,"context_line":"                                       dimensions\u003d{key: value},"},{"line_number":44,"context_line":"                                       timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_5353346b","line":41,"updated":"2015-11-12 00:23:49.000000000","message":"This is really value_meta, not meta_value. There is metadata about the metric while the value_meta is really about just this one measurement.","commit_id":"1264da2e204a1e9af729236cc7ca3afcc12926a7"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"7caa7886ae81a67280f25ad998277cb8ea7df853","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        cls._test_name \u003d name"},{"line_number":49,"context_line":"        cls._test_key \u003d key"},{"line_number":50,"context_line":"        cls._test_value \u003d value"},{"line_number":51,"context_line":"        cls._time_iso \u003d time_iso"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        timestamp2 \u003d int(time.time() * 1000 + 6000)"},{"line_number":54,"context_line":"        time_iso_millisecond2 \u003d helpers.timestamp_to_iso_millis(timestamp2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_2ee1632d","line":51,"updated":"2015-11-12 00:23:49.000000000","message":"All of the above are only used in test_create_metric() so they should be in that test. The only reason to have them in resource_setup is if they are used in multiple tests","commit_id":"1264da2e204a1e9af729236cc7ca3afcc12926a7"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"7caa7886ae81a67280f25ad998277cb8ea7df853","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                                          time_iso_millisecond2]"},{"line_number":74,"context_line":"        cls._test_metric_value \u003d [metric_value, metric_value2]"},{"line_number":75,"context_line":"        cls._test_meta_key \u003d [meta_key, meta_key2]"},{"line_number":76,"context_line":"        cls._test_meta_value \u003d [meta_value, meta_value2]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def resource_cleanup(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_ced6974e","line":76,"updated":"2015-11-12 00:23:49.000000000","message":"See above, but test_create_metrics","commit_id":"1264da2e204a1e9af729236cc7ca3afcc12926a7"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"7caa7886ae81a67280f25ad998277cb8ea7df853","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                                     set([\u0027columns\u0027, \u0027dimensions\u0027, \u0027id\u0027,"},{"line_number":97,"context_line":"                                          \u0027measurements\u0027, \u0027name\u0027]))"},{"line_number":98,"context_line":"                    self.assertEqual(set(element[\u0027columns\u0027]),"},{"line_number":99,"context_line":"                                     set([\u0027timestamp\u0027, \u0027value\u0027, \u0027value_meta\u0027]))"},{"line_number":100,"context_line":"                    self.assertEqual(str(element[\u0027dimensions\u0027]"},{"line_number":101,"context_line":"                                         [self._test_key]),"},{"line_number":102,"context_line":"                                     self._test_value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_93a19c48","line":99,"updated":"2015-11-12 00:23:49.000000000","message":"The first two self.assertEqual statements are true for every measurement returned. They should be pulled into a helper function instead of duplicated across the tests. That way if a new column is added, the tests can all be fixed by changing one place","commit_id":"1264da2e204a1e9af729236cc7ca3afcc12926a7"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"7caa7886ae81a67280f25ad998277cb8ea7df853","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                     self._test_metric_value[0])"},{"line_number":110,"context_line":"                    self.assertEqual(str(measurement[2]"},{"line_number":111,"context_line":"                                         [self._test_meta_key[0]]),"},{"line_number":112,"context_line":"                                     self._test_meta_value[0])"},{"line_number":113,"context_line":"                    return"},{"line_number":114,"context_line":"            time.sleep(constants.RETRY_WAIT_SECS)"},{"line_number":115,"context_line":"            if i \u003d\u003d constants.MAX_RETRIES - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_6e40cb07","line":112,"updated":"2015-11-12 00:23:49.000000000","message":"These assertEquals should be moved to a helper function and then measurement and self._metric could be passed to it. Then it could be reused in the next test.","commit_id":"1264da2e204a1e9af729236cc7ca3afcc12926a7"}]}
