)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"c2a416fcc878c67dca724bcd7ab9130710235993","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Demo: https://tovin07.github.io/aodh/alarm_delete.html"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"HOW TO TEST?"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"1. Install devstack with aodh as usual"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"2. Install osprofiler"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    pip install osprofiler"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"3. Add these line to /etc/aodh/aodh.conf"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"   [profiler]"},{"line_number":31,"context_line":"   enabled \u003d true"},{"line_number":32,"context_line":"   hmac_keys \u003d SECRET_KEY"},{"line_number":33,"context_line":"   connection_string \u003d redis://localhost:6379 # example when using redis"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"4. Pass HMAC_KEYS to client commands"},{"line_number":36,"context_line":"    - aodh client with `--profile \u003cHMAC_KEYS\u003e`"},{"line_number":37,"context_line":"    - openstack client with `--os-profiler \u003cHMAC_KEYS\u003e`"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Output will look like this:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"To display trace use the command:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  osprofiler trace show --html \u003cTRACE_ID\u003e"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"5. Use osprofiler to get the trace"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    osprofiler trace show \\"},{"line_number":48,"context_line":"        --connection-string redis://localhost:6379 \\"},{"line_number":49,"context_line":"        --out out.html \\"},{"line_number":50,"context_line":"        --html \u003cTRACE_ID\u003e"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"6. Open that html file with browser and view the result"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Change-Id: I44bf27413af2133451cbd84d908631ce6a2fe1f7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f1a1f67_19f4b4ce","line":52,"range":{"start_line":20,"start_character":0,"end_line":52,"end_character":55},"updated":"2017-07-14 08:08:08.000000000","message":"How about writing on launchpad or your github?","commit_id":"e6f46d34c905edcd1267c1702409e05715b3a563"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"55f97cd9d33a0131be3ff972188e5b428a1e8029","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Demo: https://tovin07.github.io/aodh/alarm_delete.html"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"HOW TO TEST?"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"1. Install devstack with aodh as usual"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"2. Install osprofiler"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    pip install osprofiler"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"3. Add these line to /etc/aodh/aodh.conf"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"   [profiler]"},{"line_number":31,"context_line":"   enabled \u003d true"},{"line_number":32,"context_line":"   hmac_keys \u003d SECRET_KEY"},{"line_number":33,"context_line":"   connection_string \u003d redis://localhost:6379 # example when using redis"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"4. Pass HMAC_KEYS to client commands"},{"line_number":36,"context_line":"    - aodh client with `--profile \u003cHMAC_KEYS\u003e`"},{"line_number":37,"context_line":"    - openstack client with `--os-profiler \u003cHMAC_KEYS\u003e`"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Output will look like this:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"To display trace use the command:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  osprofiler trace show --html \u003cTRACE_ID\u003e"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"5. Use osprofiler to get the trace"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    osprofiler trace show \\"},{"line_number":48,"context_line":"        --connection-string redis://localhost:6379 \\"},{"line_number":49,"context_line":"        --out out.html \\"},{"line_number":50,"context_line":"        --html \u003cTRACE_ID\u003e"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"6. Open that html file with browser and view the result"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Change-Id: I44bf27413af2133451cbd84d908631ce6a2fe1f7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f1a1f67_f99e9861","line":52,"range":{"start_line":20,"start_character":0,"end_line":52,"end_character":55},"in_reply_to":"1f1a1f67_19f4b4ce","updated":"2017-07-14 08:14:51.000000000","message":"I put it here to avoid finding how to test this patch in other place.\n\nYou can see another example here.\n\nhttps://review.openstack.org/#/c/358142/","commit_id":"e6f46d34c905edcd1267c1702409e05715b3a563"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"7a4c3a86b20e2ebf5f7032eea727bd6c8c6cec29","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Demo: https://tovin07.github.io/aodh/alarm_delete.html"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"HOW TO TEST?"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"1. Install devstack with aodh as usual"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"2. Install osprofiler"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    pip install osprofiler"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"3. Add these line to /etc/aodh/aodh.conf"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"   [profiler]"},{"line_number":31,"context_line":"   enabled \u003d true"},{"line_number":32,"context_line":"   hmac_keys \u003d SECRET_KEY"},{"line_number":33,"context_line":"   connection_string \u003d redis://localhost:6379 # example when using redis"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"4. Pass HMAC_KEYS to client commands"},{"line_number":36,"context_line":"    - aodh client with `--profile \u003cHMAC_KEYS\u003e`"},{"line_number":37,"context_line":"    - openstack client with `--os-profiler \u003cHMAC_KEYS\u003e`"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Output will look like this:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"To display trace use the command:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  osprofiler trace show --html \u003cTRACE_ID\u003e"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"5. Use osprofiler to get the trace"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    osprofiler trace show \\"},{"line_number":48,"context_line":"        --connection-string redis://localhost:6379 \\"},{"line_number":49,"context_line":"        --out out.html \\"},{"line_number":50,"context_line":"        --html \u003cTRACE_ID\u003e"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"6. Open that html file with browser and view the result"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Change-Id: I44bf27413af2133451cbd84d908631ce6a2fe1f7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_689fbfb4","line":52,"range":{"start_line":20,"start_character":0,"end_line":52,"end_character":55},"in_reply_to":"1f1a1f67_f99e9861","updated":"2017-08-22 12:09:15.000000000","message":"I see.  Thanks.","commit_id":"e6f46d34c905edcd1267c1702409e05715b3a563"}],"aodh/api/controllers/v2/query.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b78c3347323466201c7423596e035ef5f94d8c53","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"@profiler.trace_cls(\u0027api\u0027)"},{"line_number":80,"context_line":"class ValidatedComplexQuery(object):"},{"line_number":81,"context_line":"    complex_operators \u003d [\"and\", \"or\"]"},{"line_number":82,"context_line":"    order_directions \u003d [\"asc\", \"desc\"]"},{"line_number":83,"context_line":"    simple_ops \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003e\", \"\u003c\u003d\", \"\u003d\u003c\", \"\u003e\u003d\", \"\u003d\u003e\", \"\u003d~\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_256091ce","line":80,"updated":"2017-07-13 09:39:31.000000000","message":"Why other controllers of this file are not profiled ?","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"e9048d7e1e4850bd736b6ecc4079e598bf7e3a18","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"@profiler.trace_cls(\u0027api\u0027)"},{"line_number":80,"context_line":"class ValidatedComplexQuery(object):"},{"line_number":81,"context_line":"    complex_operators \u003d [\"and\", \"or\"]"},{"line_number":82,"context_line":"    order_directions \u003d [\"asc\", \"desc\"]"},{"line_number":83,"context_line":"    simple_ops \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003e\", \"\u003c\u003d\", \"\u003d\u003c\", \"\u003e\u003d\", \"\u003d\u003e\", \"\u003d~\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_edcb7f47","line":80,"in_reply_to":"1f1a1f67_256091ce","updated":"2017-07-14 02:51:47.000000000","message":"Actually, OSprofiler traces public methods by default (not static/class or private methods) [1].\nTherefore, in this case I do not add trace point to other controller class.\n\nHowever, we still have the ability to add trace point for static/class/private methods if we `really` want.\n\n[1] https://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/profiler.py#n160","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"fe6e4d83ab3e7b7bf1953dd8c15c851bf5c8fa07","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"@profiler.trace_cls(\u0027api\u0027)"},{"line_number":80,"context_line":"class ValidatedComplexQuery(object):"},{"line_number":81,"context_line":"    complex_operators \u003d [\"and\", \"or\"]"},{"line_number":82,"context_line":"    order_directions \u003d [\"asc\", \"desc\"]"},{"line_number":83,"context_line":"    simple_ops \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003e\", \"\u003c\u003d\", \"\u003d\u003c\", \"\u003e\u003d\", \"\u003d\u003e\", \"\u003d~\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_a5ba61db","line":80,"in_reply_to":"1f1a1f67_256091ce","updated":"2017-07-13 09:49:40.000000000","message":"I will add to other controllers.","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"6e70db64a438921da412c23ccbab83720d9faf85","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"@profiler.trace_cls(\u0027api\u0027)"},{"line_number":80,"context_line":"class ValidatedComplexQuery(object):"},{"line_number":81,"context_line":"    complex_operators \u003d [\"and\", \"or\"]"},{"line_number":82,"context_line":"    order_directions \u003d [\"asc\", \"desc\"]"},{"line_number":83,"context_line":"    simple_ops \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003e\", \"\u003c\u003d\", \"\u003d\u003c\", \"\u003e\u003d\", \"\u003d\u003e\", \"\u003d~\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_2625a5ab","line":80,"in_reply_to":"1f1a1f67_edcb7f47","updated":"2018-01-16 15:45:06.000000000","message":"i don\u0027t understand how the controllers in the query endpoint are different from alarm endpoint. what\u0027s the criteria for adding the decorator?","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"440c1b49b748fa7fab4cacaef27edd8e291e0c9d","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"@profiler.trace_cls(\u0027api\u0027)"},{"line_number":80,"context_line":"class ValidatedComplexQuery(object):"},{"line_number":81,"context_line":"    complex_operators \u003d [\"and\", \"or\"]"},{"line_number":82,"context_line":"    order_directions \u003d [\"asc\", \"desc\"]"},{"line_number":83,"context_line":"    simple_ops \u003d [\"\u003d\", \"!\u003d\", \"\u003c\", \"\u003e\", \"\u003c\u003d\", \"\u003d\u003c\", \"\u003e\u003d\", \"\u003d\u003e\", \"\u003d~\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_be7af120","line":80,"in_reply_to":"7f96bb07_2625a5ab","updated":"2018-02-23 02:14:46.000000000","message":"It depend on the detail of the output trace.\nIf we want to have more trace points, just add it.","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"}],"aodh/profiler.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b78c3347323466201c7423596e035ef5f94d8c53","unresolved":false,"context_lines":[{"line_number":24,"context_line":"profiler_web \u003d importutils.try_import(\u0027osprofiler.web\u0027)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WsgiMiddleware(object):"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_c5f2fd06","line":27,"updated":"2017-07-13 09:39:31.000000000","message":"Nothing in this file is Aodh related, this should be in osprofiler library instead.","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"fe6e4d83ab3e7b7bf1953dd8c15c851bf5c8fa07","unresolved":false,"context_lines":[{"line_number":24,"context_line":"profiler_web \u003d importutils.try_import(\u0027osprofiler.web\u0027)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WsgiMiddleware(object):"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_c5b1dde3","line":27,"in_reply_to":"1f1a1f67_c5f2fd06","updated":"2017-07-13 09:49:40.000000000","message":"actually, it is related (but not all).\nI put it here to make sure that we do not enable tracing all the time. There are some checks down there :D","commit_id":"9c416be4fb34a599035375d0b3448f0ef4067162"},{"author":{"_account_id":13702,"name":"yushiro","username":"yushiro","inactive":true},"change_message_id":"c2a416fcc878c67dca724bcd7ab9130710235993","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    Wrap the OSprofiler trace_cls decorator so that it will not try to"},{"line_number":64,"context_line":"    patch the class unless OSprofiler is present."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param name: The name of action. For example, wsgi, rpc, db, ..."},{"line_number":67,"context_line":"    :param kwargs: Any other keyword args used by profiler.trace_cls"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_191dd40e","line":66,"range":{"start_line":66,"start_character":3,"end_line":66,"end_character":16},"updated":"2017-07-14 08:08:08.000000000","message":"How about also writing return value?","commit_id":"e6f46d34c905edcd1267c1702409e05715b3a563"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"55f97cd9d33a0131be3ff972188e5b428a1e8029","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    Wrap the OSprofiler trace_cls decorator so that it will not try to"},{"line_number":64,"context_line":"    patch the class unless OSprofiler is present."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param name: The name of action. For example, wsgi, rpc, db, ..."},{"line_number":67,"context_line":"    :param kwargs: Any other keyword args used by profiler.trace_cls"},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_b906e085","line":66,"range":{"start_line":66,"start_character":3,"end_line":66,"end_character":16},"in_reply_to":"1f1a1f67_191dd40e","updated":"2017-07-14 08:14:51.000000000","message":"This is a decorator, it will always return a decorator function.\nTherefore, a return value is optional (actually redundant).","commit_id":"e6f46d34c905edcd1267c1702409e05715b3a563"}]}
