{"action":"created","issue":{"url":"https://api.github.com/repos/libtrading/libtrading/issues/60","labels_url":"https://api.github.com/repos/libtrading/libtrading/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/libtrading/libtrading/issues/60/comments","events_url":"https://api.github.com/repos/libtrading/libtrading/issues/60/events","html_url":"https://github.com/libtrading/libtrading/pull/60","id":70168929,"number":60,"title":"Measure latency with RDTSC, warmup","user":{"login":"divaykin","id":331169,"avatar_url":"https://avatars.githubusercontent.com/u/331169?v=3","gravatar_id":"","url":"https://api.github.com/users/divaykin","html_url":"https://github.com/divaykin","followers_url":"https://api.github.com/users/divaykin/followers","following_url":"https://api.github.com/users/divaykin/following{/other_user}","gists_url":"https://api.github.com/users/divaykin/gists{/gist_id}","starred_url":"https://api.github.com/users/divaykin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divaykin/subscriptions","organizations_url":"https://api.github.com/users/divaykin/orgs","repos_url":"https://api.github.com/users/divaykin/repos","events_url":"https://api.github.com/users/divaykin/events{/privacy}","received_events_url":"https://api.github.com/users/divaykin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-22T16:05:34Z","updated_at":"2015-04-25T08:44:10Z","closed_at":"2015-04-24T14:28:37Z","pull_request":{"url":"https://api.github.com/repos/libtrading/libtrading/pulls/60","html_url":"https://github.com/libtrading/libtrading/pull/60","diff_url":"https://github.com/libtrading/libtrading/pull/60.diff","patch_url":"https://github.com/libtrading/libtrading/pull/60.patch"},"body":"Monotonic clock is very time consuming. Skip first 1000 measurements if there are enough orders."},"comment":{"url":"https://api.github.com/repos/libtrading/libtrading/issues/comments/96157887","html_url":"https://github.com/libtrading/libtrading/pull/60#issuecomment-96157887","issue_url":"https://api.github.com/repos/libtrading/libtrading/issues/60","id":96157887,"user":{"login":"divaykin","id":331169,"avatar_url":"https://avatars.githubusercontent.com/u/331169?v=3","gravatar_id":"","url":"https://api.github.com/users/divaykin","html_url":"https://github.com/divaykin","followers_url":"https://api.github.com/users/divaykin/followers","following_url":"https://api.github.com/users/divaykin/following{/other_user}","gists_url":"https://api.github.com/users/divaykin/gists{/gist_id}","starred_url":"https://api.github.com/users/divaykin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divaykin/subscriptions","organizations_url":"https://api.github.com/users/divaykin/orgs","repos_url":"https://api.github.com/users/divaykin/repos","events_url":"https://api.github.com/users/divaykin/events{/privacy}","received_events_url":"https://api.github.com/users/divaykin/received_events","type":"User","site_admin":false},"created_at":"2015-04-25T08:44:10Z","updated_at":"2015-04-25T08:44:10Z","body":"@penberg according to latest micro bench 2 x CLOCK_MONOTONIC is only ~50usec which is acceptable overhead for now so lets leave it.\r\n\r\nThe `warmup` period is interesting topic - I've an impression that outliers are much more likely to happen during startup - cache is not fully lined up, C state of CPU could be wrong, etc. I'm more interested in `cruise` mode outliers than something specific to initial phase.\r\n\r\nYes, I'll do histograms later on. To me HdrHistogram is somewhat an overkill. \r\n\r\nIf we have enough observation we can estimate quantiles with simple one pass:\r\n`quantile += eta * (sgn(sample - quantile) + 2.0 * p - 1.0)`"}}