)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"8e0b330d41e58f0dd921ea9d22b4c97a4a969269","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add unit conversion for metering views"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Until now, the charts displayed by the metering views (Admin -\u003e Resource"},{"line_number":10,"context_line":"Usage) were using units as definied by the Ceilometer meters. This means"},{"line_number":11,"context_line":"that the values in the charts were sometimes very hard to read for"},{"line_number":12,"context_line":"humans (typically we would see a large number in nanoseconds, bytes,"},{"line_number":13,"context_line":"etc)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_3359c48e","line":10,"updated":"2014-09-03 11:05:43.000000000","message":"typo: definied -\u003e defined","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add unit conversion for metering views"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Until now, the charts displayed by the metering views (Admin -\u003e Resource"},{"line_number":10,"context_line":"Usage) were using units as definied by the Ceilometer meters. This means"},{"line_number":11,"context_line":"that the values in the charts were sometimes very hard to read for"},{"line_number":12,"context_line":"humans (typically we would see a large number in nanoseconds, bytes,"},{"line_number":13,"context_line":"etc)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa98f980_b5ace68d","line":10,"in_reply_to":"fa98f980_3359c48e","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"}],"horizon/utils/units.py":[{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"7c06c05bb2d785f36fdc2f7a69925c8a1c321d57","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    (\u0027MB\u0027, \u0027Mibyte\u0027),"},{"line_number":20,"context_line":"    (\u0027GB\u0027, \u0027Gibyte\u0027),"},{"line_number":21,"context_line":"    (\u0027TB\u0027, \u0027Tibyte\u0027),"},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"TIME_UNITS \u003d (\u0027ns\u0027, \u0027s\u0027, \u0027min\u0027, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_6f809dbf","line":22,"updated":"2014-06-11 21:00:39.000000000","message":"I was going to ask if it made sense to use \u0027Mebyte\u0027 and \"Tebyte\u0027 for megabyte and terabyte - but it seems as if this is based on the default unit definitions in Pint, correct?","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    (\u0027MB\u0027, \u0027Mibyte\u0027),"},{"line_number":20,"context_line":"    (\u0027GB\u0027, \u0027Gibyte\u0027),"},{"line_number":21,"context_line":"    (\u0027TB\u0027, \u0027Tibyte\u0027),"},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"TIME_UNITS \u003d (\u0027ns\u0027, \u0027s\u0027, \u0027min\u0027, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_f5b58ed0","line":22,"in_reply_to":"1ae5cdf2_6f809dbf","updated":"2014-09-19 12:28:15.000000000","message":"Yes, these come from Pint.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"8e0b330d41e58f0dd921ea9d22b4c97a4a969269","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    (\u0027TB\u0027, \u0027Tibyte\u0027),"},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"TIME_UNITS \u003d (\u0027ns\u0027, \u0027s\u0027, \u0027min\u0027, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"ureg \u003d pint.UnitRegistry()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_e484d05f","line":24,"updated":"2014-09-03 11:05:43.000000000","message":"Is there any chance that units like \u0027week\u0027/\u0027month\u0027/\u0027year\u0027 also could be useful?","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    (\u0027TB\u0027, \u0027Tibyte\u0027),"},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"TIME_UNITS \u003d (\u0027ns\u0027, \u0027s\u0027, \u0027min\u0027, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"ureg \u003d pint.UnitRegistry()"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_f52aeee5","line":24,"in_reply_to":"fa98f980_e484d05f","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"78a21b7d146216a3492e55fd9ea0a67a4b34fa97","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    return unit in _get_keys(INFORMATION_UNITS) + TIME_UNITS"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def is_larger(unit1, unit2):"},{"line_number":38,"context_line":"    \"\"\"Returns a boolean indicating whether unit1 is larger than unit2."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    E.g:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_0314954c","line":37,"updated":"2014-09-02 14:40:24.000000000","message":"I think variables should be have name  unit_1   unit_2","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    return unit in _get_keys(INFORMATION_UNITS) + TIME_UNITS"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def is_larger(unit1, unit2):"},{"line_number":38,"context_line":"    \"\"\"Returns a boolean indicating whether unit1 is larger than unit2."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    E.g:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_9539a241","line":37,"in_reply_to":"fa98f980_0314954c","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"8e0b330d41e58f0dd921ea9d22b4c97a4a969269","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def convert(value, source_unit, target_unit, fmt\u003dFalse):"},{"line_number":56,"context_line":"    \"\"\"Converts value from source_unit to target_unit. Returns a tuple"},{"line_number":57,"context_line":"    contatining the converted value and target_unit. If fmt is set to True,"},{"line_number":58,"context_line":"    the value is formatted to 2 decimal digits if it\u0027s a decimal or converted"},{"line_number":59,"context_line":"    to in if it\u0027s an integer."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_d6e2262e","line":57,"updated":"2014-09-03 11:05:43.000000000","message":"typo: contatining -\u003e containing","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def convert(value, source_unit, target_unit, fmt\u003dFalse):"},{"line_number":56,"context_line":"    \"\"\"Converts value from source_unit to target_unit. Returns a tuple"},{"line_number":57,"context_line":"    contatining the converted value and target_unit. If fmt is set to True,"},{"line_number":58,"context_line":"    the value is formatted to 2 decimal digits if it\u0027s a decimal or converted"},{"line_number":59,"context_line":"    to in if it\u0027s an integer."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_b54866cd","line":57,"in_reply_to":"fa98f980_d6e2262e","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"8e0b330d41e58f0dd921ea9d22b4c97a4a969269","unresolved":false,"context_lines":[{"line_number":55,"context_line":"def convert(value, source_unit, target_unit, fmt\u003dFalse):"},{"line_number":56,"context_line":"    \"\"\"Converts value from source_unit to target_unit. Returns a tuple"},{"line_number":57,"context_line":"    contatining the converted value and target_unit. If fmt is set to True,"},{"line_number":58,"context_line":"    the value is formatted to 2 decimal digits if it\u0027s a decimal or converted"},{"line_number":59,"context_line":"    to in if it\u0027s an integer."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    E.g:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_76741a68","line":58,"updated":"2014-09-03 11:05:43.000000000","message":"Could be read as \u0027formatted to 2 digits if:\n  * it\u0027s a decimal\n  * it converted to in\n\nRewording suggestion: \nHaving fmt set to True causes the value to be formatted to 2 decimal digits if it\u0027s a decimal or be formatted as integer if it\u0027s an integer.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":55,"context_line":"def convert(value, source_unit, target_unit, fmt\u003dFalse):"},{"line_number":56,"context_line":"    \"\"\"Converts value from source_unit to target_unit. Returns a tuple"},{"line_number":57,"context_line":"    contatining the converted value and target_unit. If fmt is set to True,"},{"line_number":58,"context_line":"    the value is formatted to 2 decimal digits if it\u0027s a decimal or converted"},{"line_number":59,"context_line":"    to in if it\u0027s an integer."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    E.g:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_75251e09","line":58,"in_reply_to":"fa98f980_76741a68","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"7c06c05bb2d785f36fdc2f7a69925c8a1c321d57","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                return tuple_of_tuples[i - 1][0]"},{"line_number":164,"context_line":"            except IndexError:"},{"line_number":165,"context_line":"                return None"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def _format_value(value):"},{"line_number":169,"context_line":"    value \u003d decimal.Decimal(value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_52a1c6f6","line":166,"updated":"2014-06-11 21:00:39.000000000","message":"Are these \u0027key\u0027 functions generic enough that they could be placed outside of the units util?  Or do you think it\u0027s very specific to how you\u0027re manipulating the units definitions?","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                return tuple_of_tuples[i - 1][0]"},{"line_number":164,"context_line":"            except IndexError:"},{"line_number":165,"context_line":"                return None"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def _format_value(value):"},{"line_number":169,"context_line":"    value \u003d decimal.Decimal(value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_40577602","line":166,"in_reply_to":"1ae5cdf2_52a1c6f6","updated":"2014-09-19 12:28:15.000000000","message":"Done, moved these to utils/functions.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"7c06c05bb2d785f36fdc2f7a69925c8a1c321d57","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    value \u003d decimal.Decimal(value)"},{"line_number":170,"context_line":"    if int(value) \u003d\u003d value:"},{"line_number":171,"context_line":"        return int(value)"},{"line_number":172,"context_line":"    return round(value, 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_325fdae6","line":172,"updated":"2014-06-11 21:00:39.000000000","message":"This sort of logic is also used here:\n\nhttps://review.openstack.org/#/c/93345/\n\nI\u0027m not sure there\u0027s a clean way to combine the two, but I do think there was a consensus to round to one decimal place instead of two - might be worth double checking.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    value \u003d decimal.Decimal(value)"},{"line_number":170,"context_line":"    if int(value) \u003d\u003d value:"},{"line_number":171,"context_line":"        return int(value)"},{"line_number":172,"context_line":"    return round(value, 2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_154db299","line":172,"in_reply_to":"1ae5cdf2_325fdae6","updated":"2014-09-19 12:28:15.000000000","message":"Thanks for pointing that out, however the sizeformat method returns unicode, while I need int/float here. I have changed the rounding to 1 decimal place instead of 2.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"7f50ba78f445b25453f3f25ac545c3168dade176","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from horizon.utils import functions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"INFORMATION_UNITS \u003d ("},{"line_number":19,"context_line":"    (\u0027B\u0027, \u0027byte\u0027),"},{"line_number":20,"context_line":"    (\u0027KB\u0027, \u0027Kibyte\u0027),"},{"line_number":21,"context_line":"    (\u0027MB\u0027, \u0027Mibyte\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_1df33b9f","line":18,"updated":"2014-09-23 14:18:33.000000000","message":"I think a comment describing what is being mapped here would be helpful.  (I think its Ceilometer to Pint, right?).  Also, what do you think about extending this mapping up to the exabyte range?","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"e887f811a13091ee226c3f7b4fa553c61ccd89bd","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from horizon.utils import functions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"INFORMATION_UNITS \u003d ("},{"line_number":19,"context_line":"    (\u0027B\u0027, \u0027byte\u0027),"},{"line_number":20,"context_line":"    (\u0027KB\u0027, \u0027Kibyte\u0027),"},{"line_number":21,"context_line":"    (\u0027MB\u0027, \u0027Mibyte\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_d9736713","line":18,"in_reply_to":"da9df570_1df33b9f","updated":"2014-09-24 13:48:10.000000000","message":"Done","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"7f50ba78f445b25453f3f25ac545c3168dade176","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    False"},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    if unit_1 in functions.get_keys(INFORMATION_UNITS):"},{"line_number":50,"context_line":"        unit_1 \u003d functions.value_for_key(INFORMATION_UNITS, unit_1)"},{"line_number":51,"context_line":"    if unit_2 in functions.get_keys(INFORMATION_UNITS):"},{"line_number":52,"context_line":"        unit_2 \u003d functions.value_for_key(INFORMATION_UNITS, unit_2)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5d9ce3c0","line":50,"updated":"2014-09-23 14:18:33.000000000","message":"I think it would be better to make functions.value_for_key just return the key if no match is found.  That way you could avoid all of these if checks, so the code would be tidier.  It might be faster too (fewer times through the loops).","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"e887f811a13091ee226c3f7b4fa553c61ccd89bd","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    False"},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    if unit_1 in functions.get_keys(INFORMATION_UNITS):"},{"line_number":50,"context_line":"        unit_1 \u003d functions.value_for_key(INFORMATION_UNITS, unit_1)"},{"line_number":51,"context_line":"    if unit_2 in functions.get_keys(INFORMATION_UNITS):"},{"line_number":52,"context_line":"        unit_2 \u003d functions.value_for_key(INFORMATION_UNITS, unit_2)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5f2bd72f","line":50,"in_reply_to":"da9df570_5d9ce3c0","updated":"2014-09-24 13:48:10.000000000","message":"Done","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"7f50ba78f445b25453f3f25ac545c3168dade176","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            value, unit \u003d convert(value, \u0027min\u0027, \u0027hr\u0027)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            if value \u003e\u003d 24:"},{"line_number":137,"context_line":"                value, unit \u003d convert(value, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    return functions.format_value(value), unit"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_9d3c8be4","line":137,"updated":"2014-09-23 14:18:33.000000000","message":"TIME_UNITS goes all the way up through years.  I think this function and the constant should match.","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"e887f811a13091ee226c3f7b4fa553c61ccd89bd","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            value, unit \u003d convert(value, \u0027min\u0027, \u0027hr\u0027)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            if value \u003e\u003d 24:"},{"line_number":137,"context_line":"                value, unit \u003d convert(value, \u0027hr\u0027, \u0027day\u0027)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    return functions.format_value(value), unit"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_ffd48b21","line":137,"in_reply_to":"da9df570_9d3c8be4","updated":"2014-09-24 13:48:10.000000000","message":"Done","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"27b007146e0b3e6a4f69f4cf5d67427d374043ab","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _normalize_time(value, unit):"},{"line_number":127,"context_line":"    value, unit \u003d convert(value, unit, \u0027s\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    if value \u003e\u003d 60:"},{"line_number":130,"context_line":"        value, unit \u003d convert(value, \u0027s\u0027, \u0027min\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9aa7fdbe_c082d5ff","line":127,"updated":"2014-10-20 13:25:12.000000000","message":"This is the function that I believe is selecting units that are sometimes too  large.","commit_id":"96454e52fd2a496d568634ef95c62758afe7588a"}],"openstack_dashboard/dashboards/admin/metering/views.py":[{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"7c06c05bb2d785f36fdc2f7a69925c8a1c321d57","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return series"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @staticmethod"},{"line_number":67,"context_line":"    def normalize_series(series):"},{"line_number":68,"context_line":"        \"\"\"Transform series\u0027 values into a more human readable form:"},{"line_number":69,"context_line":"        1) Determine the data point with the maximum value"},{"line_number":70,"context_line":"        2) Decide the unit appropriate for this value (normalize it)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_925a6ef0","line":67,"updated":"2014-06-11 21:00:39.000000000","message":"Would it make sense to rename to \u0027normalize_series_by_unit_?","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return series"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @staticmethod"},{"line_number":67,"context_line":"    def normalize_series(series):"},{"line_number":68,"context_line":"        \"\"\"Transform series\u0027 values into a more human readable form:"},{"line_number":69,"context_line":"        1) Determine the data point with the maximum value"},{"line_number":70,"context_line":"        2) Decide the unit appropriate for this value (normalize it)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_959d225a","line":67,"in_reply_to":"1ae5cdf2_925a6ef0","updated":"2014-09-19 12:28:15.000000000","message":"Done","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"8e0b330d41e58f0dd921ea9d22b4c97a4a969269","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # If unit needs to be changed, set the new unit for all data points"},{"line_number":87,"context_line":"        # and convert all values to that unit"},{"line_number":88,"context_line":"        if units.is_larger(unit, target_unit):"},{"line_number":89,"context_line":"            target_unit \u003d unit"},{"line_number":90,"context_line":"            for i, point in enumerate(series[:]):"},{"line_number":91,"context_line":"                if point[\u0027unit\u0027] !\u003d target_unit:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_84a22497","line":88,"updated":"2014-09-03 11:05:43.000000000","message":"Could it be the case that the input data is too small, e.g. 0 \u003c value \u003c 1?","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"9975d75e911a42e1a193ea249cc99e32558f30ec","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        # If unit needs to be changed, set the new unit for all data points"},{"line_number":87,"context_line":"        # and convert all values to that unit"},{"line_number":88,"context_line":"        if units.is_larger(unit, target_unit):"},{"line_number":89,"context_line":"            target_unit \u003d unit"},{"line_number":90,"context_line":"            for i, point in enumerate(series[:]):"},{"line_number":91,"context_line":"                if point[\u0027unit\u0027] !\u003d target_unit:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_559c9a5d","line":88,"in_reply_to":"fa98f980_84a22497","updated":"2014-09-19 12:28:15.000000000","message":"I don\u0027t think so, given the nature of these measurements, we are dealing usually with very large values. See http://docs.openstack.org/developer/ceilometer/measurements.html for more details.","commit_id":"9d2037821b7d2853f09053e249b883cf084537a1"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"7f50ba78f445b25453f3f25ac545c3168dade176","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    @staticmethod"},{"line_number":68,"context_line":"    def normalize_series_by_unit(series):"},{"line_number":69,"context_line":"        \"\"\"Transform series\u0027 values into a more human readable form:"},{"line_number":70,"context_line":"        1) Determine the data point with the maximum value"},{"line_number":71,"context_line":"        2) Decide the unit appropriate for this value (normalize it)"},{"line_number":72,"context_line":"        3) Convert other values to this new unit, if necessary"},{"line_number":73,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5dbb03e5","line":70,"updated":"2014-09-23 14:18:33.000000000","message":"Is there any concern that one outlier data point will cause a difficult to read value for most of the other data?  Why use the max instead of an average value?","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"e887f811a13091ee226c3f7b4fa553c61ccd89bd","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    @staticmethod"},{"line_number":68,"context_line":"    def normalize_series_by_unit(series):"},{"line_number":69,"context_line":"        \"\"\"Transform series\u0027 values into a more human readable form:"},{"line_number":70,"context_line":"        1) Determine the data point with the maximum value"},{"line_number":71,"context_line":"        2) Decide the unit appropriate for this value (normalize it)"},{"line_number":72,"context_line":"        3) Convert other values to this new unit, if necessary"},{"line_number":73,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_bfa043a0","line":70,"in_reply_to":"da9df570_5dbb03e5","updated":"2014-09-24 13:48:10.000000000","message":"I guess that\u0027s possible, but the same can be true if the average is used and most of the values are \"far away\" from the average. I would leave it like this for now; we can change it later if it proves necessary.","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"}],"test-requirements.txt":[{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"7f50ba78f445b25453f3f25ac545c3168dade176","unresolved":false,"context_lines":[{"line_number":22,"context_line":"selenium"},{"line_number":23,"context_line":"sphinx\u003e\u003d1.1.2,!\u003d1.2.0,\u003c1.3"},{"line_number":24,"context_line":"testtools\u003e\u003d0.9.34"},{"line_number":25,"context_line":"unittest2"},{"line_number":26,"context_line":"# This also needs xvfb library installed on your OS"},{"line_number":27,"context_line":"xvfbwrapper\u003e\u003d0.1.3 #license: MIT"}],"source_content_type":"text/plain","patch_set":4,"id":"da9df570_1d07bb1d","line":25,"updated":"2014-09-23 14:18:33.000000000","message":"is this used?","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"},{"author":{"_account_id":9317,"name":"Ana Krivokapic","email":"akrivoka@redhat.com","username":"akrivoka"},"change_message_id":"e887f811a13091ee226c3f7b4fa553c61ccd89bd","unresolved":false,"context_lines":[{"line_number":22,"context_line":"selenium"},{"line_number":23,"context_line":"sphinx\u003e\u003d1.1.2,!\u003d1.2.0,\u003c1.3"},{"line_number":24,"context_line":"testtools\u003e\u003d0.9.34"},{"line_number":25,"context_line":"unittest2"},{"line_number":26,"context_line":"# This also needs xvfb library installed on your OS"},{"line_number":27,"context_line":"xvfbwrapper\u003e\u003d0.1.3 #license: MIT"}],"source_content_type":"text/plain","patch_set":4,"id":"da9df570_df726748","line":25,"in_reply_to":"da9df570_1d07bb1d","updated":"2014-09-24 13:48:10.000000000","message":"Is needed for testing Pint with python 2.6.","commit_id":"3b9776dba6b0fdac8b949c15657cd3e35209c160"}]}
