{"action":"created","comment":{"url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/comments/50041631","id":50041631,"diff_hunk":"@@ -404,6 +443,55 @@ public TestCommandPreconditionVerifier(Func<bool> hasBeenApplied)\n             {\n                 return hasBeenApplied();\n             }\n+        }\r\n+\r\n+        [Category(\"Performance\")]\r\n+        [Test]\n+        public void When_calling_ctor_of_an_aggregate_with_a_large_number_of_source_events_in_non_incrementing_order_then_the_operation_completes_quickly()\n+        {\n+            var count = 1000000;\n+            var largeListOfEvents = Enumerable.Range(1, count).Select(i => new PerfTestAggregate.SimpleEvent { SequenceNumber = i }).ToList();\n+            Shuffle(largeListOfEvents, new Random(42));\n+\n+            var sw = Stopwatch.StartNew();\n+            var t = new PerfTestAggregate(Guid.NewGuid(), largeListOfEvents);\n+            sw.Stop();\n+\n+            Console.WriteLine(\"Elapsed: {0}ms\", sw.ElapsedMilliseconds);\n+            t.Version.Should().Be(count);\n+            t.NumberOfUpdatesExecuted.Should().Be(count);\n+            sw.Elapsed.Should().BeLessThan(TimeSpan.FromSeconds(10));\n+        }\r","path":"Domain.Tests/EventSourcedAggregateTests.cs","position":75,"original_position":75,"commit_id":"ee641ce39ea31e543cf3a65640194fe337b57f77","original_commit_id":"ee641ce39ea31e543cf3a65640194fe337b57f77","user":{"login":"charlesmccarthyirl","id":1145128,"avatar_url":"https://avatars.githubusercontent.com/u/1145128?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesmccarthyirl","html_url":"https://github.com/charlesmccarthyirl","followers_url":"https://api.github.com/users/charlesmccarthyirl/followers","following_url":"https://api.github.com/users/charlesmccarthyirl/following{/other_user}","gists_url":"https://api.github.com/users/charlesmccarthyirl/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesmccarthyirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesmccarthyirl/subscriptions","organizations_url":"https://api.github.com/users/charlesmccarthyirl/orgs","repos_url":"https://api.github.com/users/charlesmccarthyirl/repos","events_url":"https://api.github.com/users/charlesmccarthyirl/events{/privacy}","received_events_url":"https://api.github.com/users/charlesmccarthyirl/received_events","type":"User","site_admin":false},"body":"2-3 seconds on my machine. As with the other similar test in EventSourceRepositoryTest, I don't want this to be treated as a flaky test if the build server is under loads / people are using a much slower machine. At 1,000,000 events, if another n^2 algorithm is introduced - there is pretty much no chance that this will complete in 10 seconds. That is the primary purpose of this test.","created_at":"2016-01-18T20:37:05Z","updated_at":"2016-01-18T20:37:05Z","html_url":"https://github.com/jonsequitur/Its.Cqrs/pull/102#discussion_r50041631","pull_request_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102","_links":{"self":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/comments/50041631"},"html":{"href":"https://github.com/jonsequitur/Its.Cqrs/pull/102#discussion_r50041631"},"pull_request":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102","id":56377993,"html_url":"https://github.com/jonsequitur/Its.Cqrs/pull/102","diff_url":"https://github.com/jonsequitur/Its.Cqrs/pull/102.diff","patch_url":"https://github.com/jonsequitur/Its.Cqrs/pull/102.patch","issue_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/102","number":102,"state":"open","locked":false,"title":"Perf tweaks for event sourcing","user":{"login":"charlesmccarthyirl","id":1145128,"avatar_url":"https://avatars.githubusercontent.com/u/1145128?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesmccarthyirl","html_url":"https://github.com/charlesmccarthyirl","followers_url":"https://api.github.com/users/charlesmccarthyirl/followers","following_url":"https://api.github.com/users/charlesmccarthyirl/following{/other_user}","gists_url":"https://api.github.com/users/charlesmccarthyirl/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesmccarthyirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesmccarthyirl/subscriptions","organizations_url":"https://api.github.com/users/charlesmccarthyirl/orgs","repos_url":"https://api.github.com/users/charlesmccarthyirl/repos","events_url":"https://api.github.com/users/charlesmccarthyirl/events{/privacy}","received_events_url":"https://api.github.com/users/charlesmccarthyirl/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-18T18:40:09Z","updated_at":"2016-01-18T20:37:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ffe932bdca3f32e9d75877305dc4575652c9441","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102/commits","review_comments_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102/comments","review_comment_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/102/comments","statuses_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/statuses/ee641ce39ea31e543cf3a65640194fe337b57f77","head":{"label":"charlesmccarthyirl:perf_tweaks_for_event_sourcing_3","ref":"perf_tweaks_for_event_sourcing_3","sha":"ee641ce39ea31e543cf3a65640194fe337b57f77","user":{"login":"charlesmccarthyirl","id":1145128,"avatar_url":"https://avatars.githubusercontent.com/u/1145128?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesmccarthyirl","html_url":"https://github.com/charlesmccarthyirl","followers_url":"https://api.github.com/users/charlesmccarthyirl/followers","following_url":"https://api.github.com/users/charlesmccarthyirl/following{/other_user}","gists_url":"https://api.github.com/users/charlesmccarthyirl/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesmccarthyirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesmccarthyirl/subscriptions","organizations_url":"https://api.github.com/users/charlesmccarthyirl/orgs","repos_url":"https://api.github.com/users/charlesmccarthyirl/repos","events_url":"https://api.github.com/users/charlesmccarthyirl/events{/privacy}","received_events_url":"https://api.github.com/users/charlesmccarthyirl/received_events","type":"User","site_admin":false},"repo":{"id":46964451,"name":"Its.Cqrs","full_name":"charlesmccarthyirl/Its.Cqrs","owner":{"login":"charlesmccarthyirl","id":1145128,"avatar_url":"https://avatars.githubusercontent.com/u/1145128?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesmccarthyirl","html_url":"https://github.com/charlesmccarthyirl","followers_url":"https://api.github.com/users/charlesmccarthyirl/followers","following_url":"https://api.github.com/users/charlesmccarthyirl/following{/other_user}","gists_url":"https://api.github.com/users/charlesmccarthyirl/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesmccarthyirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesmccarthyirl/subscriptions","organizations_url":"https://api.github.com/users/charlesmccarthyirl/orgs","repos_url":"https://api.github.com/users/charlesmccarthyirl/repos","events_url":"https://api.github.com/users/charlesmccarthyirl/events{/privacy}","received_events_url":"https://api.github.com/users/charlesmccarthyirl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/charlesmccarthyirl/Its.Cqrs","description":"A set of libraries for CQRS and Event Sourcing, with a Domain-Driven Design flavor.","fork":true,"url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs","forks_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/forks","keys_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/teams","hooks_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/hooks","issue_events_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/issues/events{/number}","events_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/events","assignees_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/assignees{/user}","branches_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/branches{/branch}","tags_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/tags","blobs_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/git/refs{/sha}","trees_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/statuses/{sha}","languages_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/languages","stargazers_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/stargazers","contributors_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/contributors","subscribers_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/subscribers","subscription_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/subscription","commits_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/commits{/sha}","git_commits_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/git/commits{/sha}","comments_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/comments{/number}","issue_comment_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/issues/comments{/number}","contents_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/contents/{+path}","compare_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/merges","archive_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/downloads","issues_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/issues{/number}","pulls_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/pulls{/number}","milestones_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/milestones{/number}","notifications_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/labels{/name}","releases_url":"https://api.github.com/repos/charlesmccarthyirl/Its.Cqrs/releases{/id}","created_at":"2015-11-27T06:51:38Z","updated_at":"2016-01-17T05:11:16Z","pushed_at":"2016-01-18T18:38:47Z","git_url":"git://github.com/charlesmccarthyirl/Its.Cqrs.git","ssh_url":"git@github.com:charlesmccarthyirl/Its.Cqrs.git","clone_url":"https://github.com/charlesmccarthyirl/Its.Cqrs.git","svn_url":"https://github.com/charlesmccarthyirl/Its.Cqrs","homepage":"","size":2070,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"jonsequitur:master","ref":"master","sha":"46726e288bfcc6b5696ee93a61c3eb0cd8f33220","user":{"login":"jonsequitur","id":547415,"avatar_url":"https://avatars.githubusercontent.com/u/547415?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsequitur","html_url":"https://github.com/jonsequitur","followers_url":"https://api.github.com/users/jonsequitur/followers","following_url":"https://api.github.com/users/jonsequitur/following{/other_user}","gists_url":"https://api.github.com/users/jonsequitur/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsequitur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsequitur/subscriptions","organizations_url":"https://api.github.com/users/jonsequitur/orgs","repos_url":"https://api.github.com/users/jonsequitur/repos","events_url":"https://api.github.com/users/jonsequitur/events{/privacy}","received_events_url":"https://api.github.com/users/jonsequitur/received_events","type":"User","site_admin":false},"repo":{"id":26377662,"name":"Its.Cqrs","full_name":"jonsequitur/Its.Cqrs","owner":{"login":"jonsequitur","id":547415,"avatar_url":"https://avatars.githubusercontent.com/u/547415?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsequitur","html_url":"https://github.com/jonsequitur","followers_url":"https://api.github.com/users/jonsequitur/followers","following_url":"https://api.github.com/users/jonsequitur/following{/other_user}","gists_url":"https://api.github.com/users/jonsequitur/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsequitur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsequitur/subscriptions","organizations_url":"https://api.github.com/users/jonsequitur/orgs","repos_url":"https://api.github.com/users/jonsequitur/repos","events_url":"https://api.github.com/users/jonsequitur/events{/privacy}","received_events_url":"https://api.github.com/users/jonsequitur/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonsequitur/Its.Cqrs","description":"A set of libraries for CQRS and Event Sourcing, with a Domain-Driven Design flavor.","fork":false,"url":"https://api.github.com/repos/jonsequitur/Its.Cqrs","forks_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/forks","keys_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/teams","hooks_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/hooks","issue_events_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/events{/number}","events_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/events","assignees_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/assignees{/user}","branches_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/branches{/branch}","tags_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/tags","blobs_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/statuses/{sha}","languages_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/languages","stargazers_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/stargazers","contributors_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/contributors","subscribers_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/subscribers","subscription_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/subscription","commits_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/contents/{+path}","compare_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/merges","archive_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/downloads","issues_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues{/number}","pulls_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls{/number}","milestones_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/milestones{/number}","notifications_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/labels{/name}","releases_url":"https://api.github.com/repos/jonsequitur/Its.Cqrs/releases{/id}","created_at":"2014-11-08T23:02:02Z","updated_at":"2016-01-15T17:17:56Z","pushed_at":"2016-01-18T18:40:09Z","git_url":"git://github.com/jonsequitur/Its.Cqrs.git","ssh_url":"git@github.com:jonsequitur/Its.Cqrs.git","clone_url":"https://github.com/jonsequitur/Its.Cqrs.git","svn_url":"https://github.com/jonsequitur/Its.Cqrs","homepage":"","size":2058,"stargazers_count":8,"watchers_count":8,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":20,"forks":12,"open_issues":20,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102"},"html":{"href":"https://github.com/jonsequitur/Its.Cqrs/pull/102"},"issue":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/102"},"comments":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/jonsequitur/Its.Cqrs/statuses/ee641ce39ea31e543cf3a65640194fe337b57f77"}}}}