{"action":"created","issue":{"url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/104","repository_url":"https://api.github.com/repos/justeat/JustEat.StatsD","labels_url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/104/comments","events_url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/104/events","html_url":"https://github.com/justeat/JustEat.StatsD/pull/104","id":357399691,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDI1MTEz","number":104,"title":"Zero allocating StatsDPublisher","user":{"login":"dv00d00","id":1162823,"node_id":"MDQ6VXNlcjExNjI4MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1162823?v=4","gravatar_id":"","url":"https://api.github.com/users/dv00d00","html_url":"https://github.com/dv00d00","followers_url":"https://api.github.com/users/dv00d00/followers","following_url":"https://api.github.com/users/dv00d00/following{/other_user}","gists_url":"https://api.github.com/users/dv00d00/gists{/gist_id}","starred_url":"https://api.github.com/users/dv00d00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dv00d00/subscriptions","organizations_url":"https://api.github.com/users/dv00d00/orgs","repos_url":"https://api.github.com/users/dv00d00/repos","events_url":"https://api.github.com/users/dv00d00/events{/privacy}","received_events_url":"https://api.github.com/users/dv00d00/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-09-05T20:55:55Z","updated_at":"2018-09-14T14:54:17Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/justeat/JustEat.StatsD/pulls/104","html_url":"https://github.com/justeat/JustEat.StatsD/pull/104","diff_url":"https://github.com/justeat/JustEat.StatsD/pull/104.diff","patch_url":"https://github.com/justeat/JustEat.StatsD/pull/104.patch"},"body":"I've added a proof of concept implementation of buffer based statsd publisher.\r\n\r\nKey points:\r\n\r\n- A concept of statsd message struct\r\n- Do not attempt formatting before sampling\r\n- Format directly into utf8\r\n- v2 transport interface uses ArraySegment<byte> which was in .net since 4.5\r\n- zero allocations in .net core 2.1 with pooled udp transport\r\n\r\n`Utf8FormatterBench`\r\n\r\n|Method |     Mean |     Error |    StdDev | Scaled |  Gen 0 | Allocated |\r\n|------------ |---------:|----------:|----------:|-------:|-------:|----------:|\r\n| StringBased | 609.8 ns | 2.1574 ns | 0.1219 ns |   1.00 | 0.2203 |     696 B |\r\n| BufferBased | 279.9 ns | 0.1432 ns | 0.0081 ns |   0.46 |      - |       0 B |\r\n\r\n`StatSendingBenchmark`\r\n\r\n|Method |       Mean |     Error |    StdDev |  Gen 0 | Allocated |\r\n|------------------- |-----------:|----------:|----------:|-------:|----------:|\r\n|             RunUdp | 288.132 us | 6.1692 us | 0.3486 us | 0.4883 |    2944 B |\r\n| RunUdpWithSampling |  30.062 us | 2.3620 us | 0.1335 us | 0.1221 |     467 B |\r\n|              RunIp | 264.734 us | 9.0817 us | 0.5131 us | 0.4883 |    2944 B |\r\n|  RunIpWithSampling |  29.965 us | 2.8734 us | 0.1624 us | 0.1221 |     468 B |\r\n|              RunV2 |  62.660 us | 1.9967 us | 0.1128 us |      - |       0 B |\r\n|  RunV2WithSampling |   6.438 us | 0.3993 us | 0.0226 us |      - |       0 B |\r\n"},"comment":{"url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/comments/421384386","html_url":"https://github.com/justeat/JustEat.StatsD/pull/104#issuecomment-421384386","issue_url":"https://api.github.com/repos/justeat/JustEat.StatsD/issues/104","id":421384386,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTM4NDM4Ng==","user":{"login":"dv00d00","id":1162823,"node_id":"MDQ6VXNlcjExNjI4MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1162823?v=4","gravatar_id":"","url":"https://api.github.com/users/dv00d00","html_url":"https://github.com/dv00d00","followers_url":"https://api.github.com/users/dv00d00/followers","following_url":"https://api.github.com/users/dv00d00/following{/other_user}","gists_url":"https://api.github.com/users/dv00d00/gists{/gist_id}","starred_url":"https://api.github.com/users/dv00d00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dv00d00/subscriptions","organizations_url":"https://api.github.com/users/dv00d00/orgs","repos_url":"https://api.github.com/users/dv00d00/repos","events_url":"https://api.github.com/users/dv00d00/events{/privacy}","received_events_url":"https://api.github.com/users/dv00d00/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T14:54:17Z","updated_at":"2018-09-14T14:54:17Z","author_association":"CONTRIBUTOR","body":"pushed updates as requested"}}
{"actor":{"display_login":"dv00d00"}}