{"action":"created","comment":{"url":"https://api.github.com/repos/google/benchmark/pulls/comments/214663892","pull_request_review_id":151766011,"id":214663892,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDY2Mzg5Mg==","diff_hunk":"@@ -463,10 +488,18 @@ void RunBenchmarks(const std::vector<Benchmark::Instance>& benchmarks,\n     flushStreams(display_reporter);\n     flushStreams(file_reporter);\n     for (const auto& benchmark : benchmarks) {\n-      std::vector<BenchmarkReporter::Run> reports =\n-          RunBenchmark(benchmark, &complexity_reports);\n-      display_reporter->ReportRuns(reports);\n-      if (file_reporter) file_reporter->ReportRuns(reports);\n+      bool display_aggregates_only;\n+      std::pair<std::vector<BenchmarkReporter::Run> /*everything*/,\n+                std::vector<BenchmarkReporter::Run> /*aggregates_only*/>\n+          reports = RunBenchmark(benchmark, &complexity_reports,\n+                                 display_aggregates_only);\n+\n+      const std::vector<BenchmarkReporter::Run>& report_for_display =\n+          display_aggregates_only ? reports.second /*aggregates_only*/","path":"src/benchmark.cc","position":106,"original_position":106,"commit_id":"c4246acfb8b1a27379ae84cdb3ac506ec998f8db","original_commit_id":"c4246acfb8b1a27379ae84cdb3ac506ec998f8db","user":{"login":"dominichamon","id":510002,"node_id":"MDQ6VXNlcjUxMDAwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/510002?v=4","gravatar_id":"","url":"https://api.github.com/users/dominichamon","html_url":"https://github.com/dominichamon","followers_url":"https://api.github.com/users/dominichamon/followers","following_url":"https://api.github.com/users/dominichamon/following{/other_user}","gists_url":"https://api.github.com/users/dominichamon/gists{/gist_id}","starred_url":"https://api.github.com/users/dominichamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominichamon/subscriptions","organizations_url":"https://api.github.com/users/dominichamon/orgs","repos_url":"https://api.github.com/users/dominichamon/repos","events_url":"https://api.github.com/users/dominichamon/events{/privacy}","received_events_url":"https://api.github.com/users/dominichamon/received_events","type":"User","site_admin":false},"body":"would this also be simpler if the return type was 'non-aggregate', 'aggregate' instead of having the first be everything?","created_at":"2018-09-03T11:50:24Z","updated_at":"2018-09-03T11:51:52Z","html_url":"https://github.com/google/benchmark/pull/665#discussion_r214663892","pull_request_url":"https://api.github.com/repos/google/benchmark/pulls/665","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/google/benchmark/pulls/comments/214663892"},"html":{"href":"https://github.com/google/benchmark/pull/665#discussion_r214663892"},"pull_request":{"href":"https://api.github.com/repos/google/benchmark/pulls/665"}}},"pull_request":{"url":"https://api.github.com/repos/google/benchmark/pulls/665","id":212603173,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNjAzMTcz","html_url":"https://github.com/google/benchmark/pull/665","diff_url":"https://github.com/google/benchmark/pull/665.diff","patch_url":"https://github.com/google/benchmark/pull/665.patch","issue_url":"https://api.github.com/repos/google/benchmark/issues/665","number":665,"state":"open","locked":false,"title":"[RFC] *Display* aggregates only.","user":{"login":"LebedevRI","id":88600,"node_id":"MDQ6VXNlcjg4NjAw","avatar_url":"https://avatars1.githubusercontent.com/u/88600?v=4","gravatar_id":"","url":"https://api.github.com/users/LebedevRI","html_url":"https://github.com/LebedevRI","followers_url":"https://api.github.com/users/LebedevRI/followers","following_url":"https://api.github.com/users/LebedevRI/following{/other_user}","gists_url":"https://api.github.com/users/LebedevRI/gists{/gist_id}","starred_url":"https://api.github.com/users/LebedevRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LebedevRI/subscriptions","organizations_url":"https://api.github.com/users/LebedevRI/orgs","repos_url":"https://api.github.com/users/LebedevRI/repos","events_url":"https://api.github.com/users/LebedevRI/events{/privacy}","received_events_url":"https://api.github.com/users/LebedevRI/received_events","type":"User","site_admin":false},"body":"There is a flag \r\nhttps://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L75-L78\r\nand a call\r\nhttps://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/include/benchmark/benchmark.h#L837-L840\r\nBut that affects everything, every reporter, destination:\r\nhttps://github.com/google/benchmark/blob/d9cab612e40017af10bddaa5b60c7067032a9e1c/src/benchmark.cc#L316\r\n\r\n\r\nIt would be quite useful to have an ability to be more picky.\r\n\r\n\r\nMore specifically, i would like to be able to only see the aggregates in the on-screen output,\r\nbut for the file output to still contain everything. The former is useful in case of a lot of repetition\r\n(or even more so if every iteration is reported separately), while the former is **great** for tooling.\r\n\r\nThis does work, and is even less intrusive than i thought it will be.\r\nBut there is a slight test coverage issue :)\r\nThese tests are *all* testing the first, display, reporter.\r\nSo we don't actually check what happens with the second, file, reporter...\r\nThis problem isn't a new one, but here i would say it is more severe.\r\nI'll see if i can easily fix it for this particular case..\r\n\r\nFixes https://github.com/google/benchmark/issues/664","created_at":"2018-09-02T17:31:40Z","updated_at":"2018-09-03T11:51:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82c280381b60cd5ad0adbc12b18e9551c4edf32a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":186811505,"node_id":"MDU6TGFiZWwxODY4MTE1MDU=","url":"https://api.github.com/repos/google/benchmark/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/benchmark/pulls/665/commits","review_comments_url":"https://api.github.com/repos/google/benchmark/pulls/665/comments","review_comment_url":"https://api.github.com/repos/google/benchmark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/benchmark/issues/665/comments","statuses_url":"https://api.github.com/repos/google/benchmark/statuses/c4246acfb8b1a27379ae84cdb3ac506ec998f8db","head":{"label":"LebedevRI:display-aggregates-only","ref":"display-aggregates-only","sha":"c4246acfb8b1a27379ae84cdb3ac506ec998f8db","user":{"login":"LebedevRI","id":88600,"node_id":"MDQ6VXNlcjg4NjAw","avatar_url":"https://avatars1.githubusercontent.com/u/88600?v=4","gravatar_id":"","url":"https://api.github.com/users/LebedevRI","html_url":"https://github.com/LebedevRI","followers_url":"https://api.github.com/users/LebedevRI/followers","following_url":"https://api.github.com/users/LebedevRI/following{/other_user}","gists_url":"https://api.github.com/users/LebedevRI/gists{/gist_id}","starred_url":"https://api.github.com/users/LebedevRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LebedevRI/subscriptions","organizations_url":"https://api.github.com/users/LebedevRI/orgs","repos_url":"https://api.github.com/users/LebedevRI/repos","events_url":"https://api.github.com/users/LebedevRI/events{/privacy}","received_events_url":"https://api.github.com/users/LebedevRI/received_events","type":"User","site_admin":false},"repo":{"id":98178383,"node_id":"MDEwOlJlcG9zaXRvcnk5ODE3ODM4Mw==","name":"benchmark","full_name":"LebedevRI/benchmark","owner":{"login":"LebedevRI","id":88600,"node_id":"MDQ6VXNlcjg4NjAw","avatar_url":"https://avatars1.githubusercontent.com/u/88600?v=4","gravatar_id":"","url":"https://api.github.com/users/LebedevRI","html_url":"https://github.com/LebedevRI","followers_url":"https://api.github.com/users/LebedevRI/followers","following_url":"https://api.github.com/users/LebedevRI/following{/other_user}","gists_url":"https://api.github.com/users/LebedevRI/gists{/gist_id}","starred_url":"https://api.github.com/users/LebedevRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LebedevRI/subscriptions","organizations_url":"https://api.github.com/users/LebedevRI/orgs","repos_url":"https://api.github.com/users/LebedevRI/repos","events_url":"https://api.github.com/users/LebedevRI/events{/privacy}","received_events_url":"https://api.github.com/users/LebedevRI/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LebedevRI/benchmark","description":"A microbenchmark support library","fork":true,"url":"https://api.github.com/repos/LebedevRI/benchmark","forks_url":"https://api.github.com/repos/LebedevRI/benchmark/forks","keys_url":"https://api.github.com/repos/LebedevRI/benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LebedevRI/benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LebedevRI/benchmark/teams","hooks_url":"https://api.github.com/repos/LebedevRI/benchmark/hooks","issue_events_url":"https://api.github.com/repos/LebedevRI/benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/LebedevRI/benchmark/events","assignees_url":"https://api.github.com/repos/LebedevRI/benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/LebedevRI/benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/LebedevRI/benchmark/tags","blobs_url":"https://api.github.com/repos/LebedevRI/benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LebedevRI/benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LebedevRI/benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/LebedevRI/benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LebedevRI/benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/LebedevRI/benchmark/languages","stargazers_url":"https://api.github.com/repos/LebedevRI/benchmark/stargazers","contributors_url":"https://api.github.com/repos/LebedevRI/benchmark/contributors","subscribers_url":"https://api.github.com/repos/LebedevRI/benchmark/subscribers","subscription_url":"https://api.github.com/repos/LebedevRI/benchmark/subscription","commits_url":"https://api.github.com/repos/LebedevRI/benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/LebedevRI/benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/LebedevRI/benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/LebedevRI/benchmark/issues/comments{/number}","contents_url":"https://api.github.com/repos/LebedevRI/benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/LebedevRI/benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LebedevRI/benchmark/merges","archive_url":"https://api.github.com/repos/LebedevRI/benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LebedevRI/benchmark/downloads","issues_url":"https://api.github.com/repos/LebedevRI/benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/LebedevRI/benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/LebedevRI/benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/LebedevRI/benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LebedevRI/benchmark/labels{/name}","releases_url":"https://api.github.com/repos/LebedevRI/benchmark/releases{/id}","deployments_url":"https://api.github.com/repos/LebedevRI/benchmark/deployments","created_at":"2017-07-24T10:22:31Z","updated_at":"2018-08-29T18:11:54Z","pushed_at":"2018-09-02T17:28:16Z","git_url":"git://github.com/LebedevRI/benchmark.git","ssh_url":"git@github.com:LebedevRI/benchmark.git","clone_url":"https://github.com/LebedevRI/benchmark.git","svn_url":"https://github.com/LebedevRI/benchmark","homepage":"","size":1356,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"5159967520f45d2bb31b226b810f4f8dc03df1c4","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":15122806,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyMjgwNg==","name":"benchmark","full_name":"google/benchmark","owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/benchmark","description":"A microbenchmark support library","fork":false,"url":"https://api.github.com/repos/google/benchmark","forks_url":"https://api.github.com/repos/google/benchmark/forks","keys_url":"https://api.github.com/repos/google/benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/benchmark/teams","hooks_url":"https://api.github.com/repos/google/benchmark/hooks","issue_events_url":"https://api.github.com/repos/google/benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/google/benchmark/events","assignees_url":"https://api.github.com/repos/google/benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/google/benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/google/benchmark/tags","blobs_url":"https://api.github.com/repos/google/benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/google/benchmark/languages","stargazers_url":"https://api.github.com/repos/google/benchmark/stargazers","contributors_url":"https://api.github.com/repos/google/benchmark/contributors","subscribers_url":"https://api.github.com/repos/google/benchmark/subscribers","subscription_url":"https://api.github.com/repos/google/benchmark/subscription","commits_url":"https://api.github.com/repos/google/benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/benchmark/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/google/benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/benchmark/merges","archive_url":"https://api.github.com/repos/google/benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/benchmark/downloads","issues_url":"https://api.github.com/repos/google/benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/google/benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/google/benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/google/benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/benchmark/labels{/name}","releases_url":"https://api.github.com/repos/google/benchmark/releases{/id}","deployments_url":"https://api.github.com/repos/google/benchmark/deployments","created_at":"2013-12-12T00:10:48Z","updated_at":"2018-09-03T04:46:29Z","pushed_at":"2018-09-02T17:31:41Z","git_url":"git://github.com/google/benchmark.git","ssh_url":"git@github.com:google/benchmark.git","clone_url":"https://github.com/google/benchmark.git","svn_url":"https://github.com/google/benchmark","homepage":"","size":1470,"stargazers_count":2720,"watchers_count":2720,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":516,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":516,"open_issues":61,"watchers":2720,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/benchmark/pulls/665"},"html":{"href":"https://github.com/google/benchmark/pull/665"},"issue":{"href":"https://api.github.com/repos/google/benchmark/issues/665"},"comments":{"href":"https://api.github.com/repos/google/benchmark/issues/665/comments"},"review_comments":{"href":"https://api.github.com/repos/google/benchmark/pulls/665/comments"},"review_comment":{"href":"https://api.github.com/repos/google/benchmark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/benchmark/pulls/665/commits"},"statuses":{"href":"https://api.github.com/repos/google/benchmark/statuses/c4246acfb8b1a27379ae84cdb3ac506ec998f8db"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dominichamon"}}