{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/1010","labels_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1010/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1010/comments","events_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1010/events","html_url":"https://github.com/Netflix/Hystrix/pull/1010","id":120517680,"number":1010,"title":"Stream metrics 1.5","user":{"login":"mattrjacobs","id":205579,"avatar_url":"https://avatars.githubusercontent.com/u/205579?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrjacobs","html_url":"https://github.com/mattrjacobs","followers_url":"https://api.github.com/users/mattrjacobs/followers","following_url":"https://api.github.com/users/mattrjacobs/following{/other_user}","gists_url":"https://api.github.com/users/mattrjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrjacobs/subscriptions","organizations_url":"https://api.github.com/users/mattrjacobs/orgs","repos_url":"https://api.github.com/users/mattrjacobs/repos","events_url":"https://api.github.com/users/mattrjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/mattrjacobs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Netflix/Hystrix/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Netflix/Hystrix/labels/hystrix-core","name":"hystrix-core","color":"009800"},{"url":"https://api.github.com/repos/Netflix/Hystrix/labels/metrics","name":"metrics","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-05T01:14:19Z","updated_at":"2015-12-05T01:16:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Netflix/Hystrix/pulls/1010","html_url":"https://github.com/Netflix/Hystrix/pull/1010","diff_url":"https://github.com/Netflix/Hystrix/pull/1010.diff","patch_url":"https://github.com/Netflix/Hystrix/pull/1010.patch"},"body":"Rebased #981 and #986 against master"},"comment":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/comments/162121961","html_url":"https://github.com/Netflix/Hystrix/pull/1010#issuecomment-162121961","issue_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1010","id":162121961,"user":{"login":"mattrjacobs","id":205579,"avatar_url":"https://avatars.githubusercontent.com/u/205579?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrjacobs","html_url":"https://github.com/mattrjacobs","followers_url":"https://api.github.com/users/mattrjacobs/followers","following_url":"https://api.github.com/users/mattrjacobs/following{/other_user}","gists_url":"https://api.github.com/users/mattrjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrjacobs/subscriptions","organizations_url":"https://api.github.com/users/mattrjacobs/orgs","repos_url":"https://api.github.com/users/mattrjacobs/repos","events_url":"https://api.github.com/users/mattrjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/mattrjacobs/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T01:16:09Z","updated_at":"2015-12-05T01:16:09Z","body":"(copied from comment in #981)\r\n\r\nThis refactoring addresses #950.  It is a large change, so I want to give the community a chance to look it over/ask questions before I start in on the 1.5.0 RC series (this will be the first commit there, if satisfactory).\r\n\r\nThe main changes in this PR:\r\n* Instead of command executions writing directly to `HystrixRollingNumber`/`HystrixRollingPercentile` data structures, they now write to a `Subject` that models a stream of command execution events.\r\n* `HystrixCommandMetrics` now consumes this stream in 4 ways:\r\n  * Cumulative counter of event types\r\n  * Rolling counter of event types\r\n  * Rolling distribution of command latencies\r\n  * Health counts of a circuit\r\n* Sample-based stream of thread pool / queue utilization\r\n\r\nThis change has not hurt performance when used in Netflix production for ~24 hours.  I will publish `jmh` results here as well.  I'll also start linking more Github issues to this ticket as I build on this work.\r\n\r\nThere should be no visible change in application behavior as a result of this change (see caveats below).  However, it enables future work to add new functionality. (like #333)\r\n\r\n**Caveats (known differences in behavior)**\r\n* Maximum concurrency of command is always 0 (`HystrixCommandMetrics#getRollingMaxConcurrentExecutions`)\r\n* `HdrHistogram` is used for latency distributions.  Percentile calculation is different from `HystrixRollingPercentile`.\r\n* On application startup, an object pool of `Histogram`s is allocated.  This is currently hardcoded to 1000 objects.  It's an area I want to explore more deeply\r\n\r\nComments/questions are welcomed and encouraged.\r\n"}}