{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/DotNetty/pulls/comments/61688530","id":61688530,"diff_hunk":"@@ -0,0 +1,122 @@\n+﻿namespace DotNetty.Transport.Tests.Performance.Sockets\n+{\n+    using System.Net;\n+    using System.Text;\n+    using System.Threading;\n+    using System.Threading.Tasks;\n+    using DotNetty.Buffers;\n+    using DotNetty.Codecs;\n+    using DotNetty.Transport.Bootstrapping;\n+    using DotNetty.Transport.Channels;\n+    using DotNetty.Transport.Channels.Sockets;\n+    using DotNetty.Transport.Tests.Performance.Utilities;\n+    using NBench;\n+\n+    public class TcpChannelPerfSpecs\n+    {\n+        const string InboundThroughputCounterName = \"inbound ops\";\n+\n+        const string OutboundThroughputCounterName = \"outbound ops\";\n+\n+        public const int WriteCount = 100000;\n+\n+        static readonly IPEndPoint TEST_ADDRESS = new IPEndPoint(IPAddress.IPv6Loopback, 0);\n+        protected readonly ManualResetEventSlim ResetEvent = new ManualResetEventSlim(false);\n+        IChannel _clientChannel;\n+        Counter _inboundThroughputCounter;\n+        Counter _outboundThroughputCounter;\n+\n+        IChannel _serverChannel;\n+        IReadFinishedSignal _signal;\n+\n+        protected Bootstrap ClientBootstrap;\n+\n+        protected IEventLoopGroup ClientGroup;\n+\n+        byte[] message;\n+        protected ServerBootstrap ServerBoostrap;\n+        protected IEventLoopGroup ServerGroup;\n+        protected IEventLoopGroup WorkerGroup;\n+\n+        static TcpChannelPerfSpecs()\n+        {\n+            // Disable the logging factory\n+            //LoggingFactory.DefaultFactory = new NoOpLoggerFactory();\n+        }\n+\n+        protected virtual IChannelHandler GetEncoder()\n+        {\n+            return new LengthFieldPrepender(4, false);\n+        }\n+\n+        protected virtual IChannelHandler GetDecoder()\n+        {\n+            return new LengthFieldBasedFrameDecoder(20, 0, 4, 0, 4);","path":"test/DotNetty.Transport.Tests.Performance/Sockets/TcpSocketChannelPerfSpec.cs","position":54,"original_position":54,"commit_id":"464b52240c9aaca6f2403f64066c53bde333f61a","original_commit_id":"464b52240c9aaca6f2403f64066c53bde333f61a","user":{"login":"nayato","id":818017,"avatar_url":"https://avatars.githubusercontent.com/u/818017?v=3","gravatar_id":"","url":"https://api.github.com/users/nayato","html_url":"https://github.com/nayato","followers_url":"https://api.github.com/users/nayato/followers","following_url":"https://api.github.com/users/nayato/following{/other_user}","gists_url":"https://api.github.com/users/nayato/gists{/gist_id}","starred_url":"https://api.github.com/users/nayato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nayato/subscriptions","organizations_url":"https://api.github.com/users/nayato/orgs","repos_url":"https://api.github.com/users/nayato/repos","events_url":"https://api.github.com/users/nayato/events{/privacy}","received_events_url":"https://api.github.com/users/nayato/received_events","type":"User","site_admin":false},"body":"why 20? :)","created_at":"2016-05-01T15:35:16Z","updated_at":"2016-05-01T15:35:16Z","html_url":"https://github.com/Azure/DotNetty/pull/95#discussion_r61688530","pull_request_url":"https://api.github.com/repos/Azure/DotNetty/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/comments/61688530"},"html":{"href":"https://github.com/Azure/DotNetty/pull/95#discussion_r61688530"},"pull_request":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/DotNetty/pulls/95","id":68484515,"html_url":"https://github.com/Azure/DotNetty/pull/95","diff_url":"https://github.com/Azure/DotNetty/pull/95.diff","patch_url":"https://github.com/Azure/DotNetty/pull/95.patch","issue_url":"https://api.github.com/repos/Azure/DotNetty/issues/95","number":95,"state":"open","locked":false,"title":"added NBench support + End2End performance spec for TcpSocketChannel","user":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"body":"Added NBench support to the build scripts, a sample NBench project, and a port of a benchmark I wrote for Helios that measures duplex end-to-end performance using a realistic encoding pipeline.","created_at":"2016-05-01T01:53:34Z","updated_at":"2016-05-01T15:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78f0ecb3170aee083453cdad631fab6062e8c5f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/DotNetty/pulls/95/commits","review_comments_url":"https://api.github.com/repos/Azure/DotNetty/pulls/95/comments","review_comment_url":"https://api.github.com/repos/Azure/DotNetty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/DotNetty/issues/95/comments","statuses_url":"https://api.github.com/repos/Azure/DotNetty/statuses/464b52240c9aaca6f2403f64066c53bde333f61a","head":{"label":"Aaronontheweb:nbench-integration","ref":"nbench-integration","sha":"464b52240c9aaca6f2403f64066c53bde333f61a","user":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"repo":{"id":39223260,"name":"DotNetty","full_name":"Aaronontheweb/DotNetty","owner":{"login":"Aaronontheweb","id":326939,"avatar_url":"https://avatars.githubusercontent.com/u/326939?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaronontheweb","html_url":"https://github.com/Aaronontheweb","followers_url":"https://api.github.com/users/Aaronontheweb/followers","following_url":"https://api.github.com/users/Aaronontheweb/following{/other_user}","gists_url":"https://api.github.com/users/Aaronontheweb/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronontheweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronontheweb/subscriptions","organizations_url":"https://api.github.com/users/Aaronontheweb/orgs","repos_url":"https://api.github.com/users/Aaronontheweb/repos","events_url":"https://api.github.com/users/Aaronontheweb/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronontheweb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Aaronontheweb/DotNetty","description":"","fork":true,"url":"https://api.github.com/repos/Aaronontheweb/DotNetty","forks_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/forks","keys_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/teams","hooks_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/hooks","issue_events_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/issues/events{/number}","events_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/events","assignees_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/assignees{/user}","branches_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/branches{/branch}","tags_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/tags","blobs_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/git/refs{/sha}","trees_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/statuses/{sha}","languages_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/languages","stargazers_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/stargazers","contributors_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/contributors","subscribers_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/subscribers","subscription_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/subscription","commits_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/commits{/sha}","git_commits_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/git/commits{/sha}","comments_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/comments{/number}","issue_comment_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/issues/comments{/number}","contents_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/contents/{+path}","compare_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/merges","archive_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/downloads","issues_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/issues{/number}","pulls_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/pulls{/number}","milestones_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/milestones{/number}","notifications_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/labels{/name}","releases_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/releases{/id}","deployments_url":"https://api.github.com/repos/Aaronontheweb/DotNetty/deployments","created_at":"2015-07-16T22:22:22Z","updated_at":"2016-03-11T01:40:59Z","pushed_at":"2016-05-01T01:52:40Z","git_url":"git://github.com/Aaronontheweb/DotNetty.git","ssh_url":"git@github.com:Aaronontheweb/DotNetty.git","clone_url":"https://github.com/Aaronontheweb/DotNetty.git","svn_url":"https://github.com/Aaronontheweb/DotNetty","homepage":null,"size":534,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Azure:dev","ref":"dev","sha":"3fb1984e9c6ce79c93379195d1fba286a975c791","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":35290377,"name":"DotNetty","full_name":"Azure/DotNetty","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/DotNetty","description":"DotNetty project – a port of netty, event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/Azure/DotNetty","forks_url":"https://api.github.com/repos/Azure/DotNetty/forks","keys_url":"https://api.github.com/repos/Azure/DotNetty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/DotNetty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/DotNetty/teams","hooks_url":"https://api.github.com/repos/Azure/DotNetty/hooks","issue_events_url":"https://api.github.com/repos/Azure/DotNetty/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/DotNetty/events","assignees_url":"https://api.github.com/repos/Azure/DotNetty/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/DotNetty/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/DotNetty/tags","blobs_url":"https://api.github.com/repos/Azure/DotNetty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/DotNetty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/DotNetty/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/DotNetty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/DotNetty/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/DotNetty/languages","stargazers_url":"https://api.github.com/repos/Azure/DotNetty/stargazers","contributors_url":"https://api.github.com/repos/Azure/DotNetty/contributors","subscribers_url":"https://api.github.com/repos/Azure/DotNetty/subscribers","subscription_url":"https://api.github.com/repos/Azure/DotNetty/subscription","commits_url":"https://api.github.com/repos/Azure/DotNetty/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/DotNetty/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/DotNetty/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/DotNetty/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/DotNetty/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/DotNetty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/DotNetty/merges","archive_url":"https://api.github.com/repos/Azure/DotNetty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/DotNetty/downloads","issues_url":"https://api.github.com/repos/Azure/DotNetty/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/DotNetty/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/DotNetty/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/DotNetty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/DotNetty/labels{/name}","releases_url":"https://api.github.com/repos/Azure/DotNetty/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/DotNetty/deployments","created_at":"2015-05-08T16:41:53Z","updated_at":"2016-04-30T05:08:57Z","pushed_at":"2016-05-01T01:53:34Z","git_url":"git://github.com/Azure/DotNetty.git","ssh_url":"git@github.com:Azure/DotNetty.git","clone_url":"https://github.com/Azure/DotNetty.git","svn_url":"https://github.com/Azure/DotNetty","homepage":"","size":655,"stargazers_count":297,"watchers_count":297,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":18,"forks":88,"open_issues":18,"watchers":297,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/95"},"html":{"href":"https://github.com/Azure/DotNetty/pull/95"},"issue":{"href":"https://api.github.com/repos/Azure/DotNetty/issues/95"},"comments":{"href":"https://api.github.com/repos/Azure/DotNetty/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/DotNetty/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/DotNetty/statuses/464b52240c9aaca6f2403f64066c53bde333f61a"}}}}