{"action":"created","comment":{"url":"https://api.github.com/repos/PragTob/benchee/pulls/comments/79480889","id":79480889,"diff_hunk":"@@ -62,27 +62,52 @@ defmodule Benchee.Formatters.Console do\n     max_label_width + 1\n   end\n \n-  defp job_reports(jobs, label_width) do\n-    Enum.map(jobs, fn(job) -> format_job job, label_width end)\n+  defp job_reports(jobs, units, label_width) do\n+    Enum.map(jobs, fn(job) -> format_job job, units, label_width end)\n+  end\n+\n+  defp units(jobs) do\n+    # Produces a map like\n+    #   %{run_time: [12345, 15431, 13222], ips: [1, 2, 3]}\n+    collected_values = jobs\n+    |> Enum.flat_map(fn({_name, job}) -> Map.to_list(job) end)\n+    # TODO: Simplify when dropping support for 1.2\n+    # For compatibility with Elixir 1.2. In 1.3, the following group-reduce-map\n+    # can b replaced by a single call to `group_by/3`\n+    #   Enum.group_by(fn({measurement, _}) -> measurement end, fn({_, value}) -> value end)","path":"lib/benchee/formatters/console.ex","position":49,"original_position":49,"commit_id":"95cb1900516e6d4a94a0cd2cba426ec713dc7069","original_commit_id":"95cb1900516e6d4a94a0cd2cba426ec713dc7069","user":{"login":"PragTob","id":606517,"avatar_url":"https://avatars.githubusercontent.com/u/606517?v=3","gravatar_id":"","url":"https://api.github.com/users/PragTob","html_url":"https://github.com/PragTob","followers_url":"https://api.github.com/users/PragTob/followers","following_url":"https://api.github.com/users/PragTob/following{/other_user}","gists_url":"https://api.github.com/users/PragTob/gists{/gist_id}","starred_url":"https://api.github.com/users/PragTob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PragTob/subscriptions","organizations_url":"https://api.github.com/users/PragTob/orgs","repos_url":"https://api.github.com/users/PragTob/repos","events_url":"https://api.github.com/users/PragTob/events{/privacy}","received_events_url":"https://api.github.com/users/PragTob/received_events","type":"User","site_admin":false},"body":"Could you please open a ticket for this? Like `Drop Elixir 1.2 support` and then we could have a check list what to change? Oh and mention that we'd probably do this with an Elixir 1.4 release :)","created_at":"2016-09-19T20:25:38Z","updated_at":"2016-09-19T20:25:38Z","html_url":"https://github.com/PragTob/benchee/pull/29#discussion_r79480889","pull_request_url":"https://api.github.com/repos/PragTob/benchee/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/comments/79480889"},"html":{"href":"https://github.com/PragTob/benchee/pull/29#discussion_r79480889"},"pull_request":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/PragTob/benchee/pulls/29","id":85833087,"html_url":"https://github.com/PragTob/benchee/pull/29","diff_url":"https://github.com/PragTob/benchee/pull/29.diff","patch_url":"https://github.com/PragTob/benchee/pull/29.patch","issue_url":"https://api.github.com/repos/PragTob/benchee/issues/29","number":29,"state":"open","locked":false,"title":"Add unit scaling to Console formatter","user":{"login":"wasnotrice","id":908,"avatar_url":"https://avatars.githubusercontent.com/u/908?v=3","gravatar_id":"","url":"https://api.github.com/users/wasnotrice","html_url":"https://github.com/wasnotrice","followers_url":"https://api.github.com/users/wasnotrice/followers","following_url":"https://api.github.com/users/wasnotrice/following{/other_user}","gists_url":"https://api.github.com/users/wasnotrice/gists{/gist_id}","starred_url":"https://api.github.com/users/wasnotrice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasnotrice/subscriptions","organizations_url":"https://api.github.com/users/wasnotrice/orgs","repos_url":"https://api.github.com/users/wasnotrice/repos","events_url":"https://api.github.com/users/wasnotrice/events{/privacy}","received_events_url":"https://api.github.com/users/wasnotrice/received_events","type":"User","site_admin":false},"body":"Integrates unit scaling into the Console formatter (solution for #27)\r\n\r\nFeatures:\r\n\r\n- always scales results\r\n- always uses \"short\" format, e.g. `M` for `Million`\r\n- adds a space between the value and the unit label to match previous output, e.g. `10 μs`\r\n- chooses the \"best\" unit for a column, and uses that unit for all values\r\n- maintains hard-coded float precision\r\n- adds the ability to scale a value to a specified unit\r\n- adds an improved failure message for column width testing:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/908/18642028/b2273bac-7e64-11e6-8fa9-92dea2751a01.png)\r\n\r\nLimitations:\r\n\r\n- has no option for disabling scaling\r\n- has no option for using a \"long\" label","created_at":"2016-09-19T17:12:28Z","updated_at":"2016-09-19T20:49:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5b91403735c888417dc176a4a57ef6346aa8e17","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PragTob/benchee/pulls/29/commits","review_comments_url":"https://api.github.com/repos/PragTob/benchee/pulls/29/comments","review_comment_url":"https://api.github.com/repos/PragTob/benchee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PragTob/benchee/issues/29/comments","statuses_url":"https://api.github.com/repos/PragTob/benchee/statuses/95cb1900516e6d4a94a0cd2cba426ec713dc7069","head":{"label":"PragTob:console_scale_units","ref":"console_scale_units","sha":"95cb1900516e6d4a94a0cd2cba426ec713dc7069","user":{"login":"PragTob","id":606517,"avatar_url":"https://avatars.githubusercontent.com/u/606517?v=3","gravatar_id":"","url":"https://api.github.com/users/PragTob","html_url":"https://github.com/PragTob","followers_url":"https://api.github.com/users/PragTob/followers","following_url":"https://api.github.com/users/PragTob/following{/other_user}","gists_url":"https://api.github.com/users/PragTob/gists{/gist_id}","starred_url":"https://api.github.com/users/PragTob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PragTob/subscriptions","organizations_url":"https://api.github.com/users/PragTob/orgs","repos_url":"https://api.github.com/users/PragTob/repos","events_url":"https://api.github.com/users/PragTob/events{/privacy}","received_events_url":"https://api.github.com/users/PragTob/received_events","type":"User","site_admin":false},"repo":{"id":59428665,"name":"benchee","full_name":"PragTob/benchee","owner":{"login":"PragTob","id":606517,"avatar_url":"https://avatars.githubusercontent.com/u/606517?v=3","gravatar_id":"","url":"https://api.github.com/users/PragTob","html_url":"https://github.com/PragTob","followers_url":"https://api.github.com/users/PragTob/followers","following_url":"https://api.github.com/users/PragTob/following{/other_user}","gists_url":"https://api.github.com/users/PragTob/gists{/gist_id}","starred_url":"https://api.github.com/users/PragTob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PragTob/subscriptions","organizations_url":"https://api.github.com/users/PragTob/orgs","repos_url":"https://api.github.com/users/PragTob/repos","events_url":"https://api.github.com/users/PragTob/events{/privacy}","received_events_url":"https://api.github.com/users/PragTob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PragTob/benchee","description":"Easy and extensible benchmarking in Elixir providing you with lots of statistics!","fork":false,"url":"https://api.github.com/repos/PragTob/benchee","forks_url":"https://api.github.com/repos/PragTob/benchee/forks","keys_url":"https://api.github.com/repos/PragTob/benchee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PragTob/benchee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PragTob/benchee/teams","hooks_url":"https://api.github.com/repos/PragTob/benchee/hooks","issue_events_url":"https://api.github.com/repos/PragTob/benchee/issues/events{/number}","events_url":"https://api.github.com/repos/PragTob/benchee/events","assignees_url":"https://api.github.com/repos/PragTob/benchee/assignees{/user}","branches_url":"https://api.github.com/repos/PragTob/benchee/branches{/branch}","tags_url":"https://api.github.com/repos/PragTob/benchee/tags","blobs_url":"https://api.github.com/repos/PragTob/benchee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PragTob/benchee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PragTob/benchee/git/refs{/sha}","trees_url":"https://api.github.com/repos/PragTob/benchee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PragTob/benchee/statuses/{sha}","languages_url":"https://api.github.com/repos/PragTob/benchee/languages","stargazers_url":"https://api.github.com/repos/PragTob/benchee/stargazers","contributors_url":"https://api.github.com/repos/PragTob/benchee/contributors","subscribers_url":"https://api.github.com/repos/PragTob/benchee/subscribers","subscription_url":"https://api.github.com/repos/PragTob/benchee/subscription","commits_url":"https://api.github.com/repos/PragTob/benchee/commits{/sha}","git_commits_url":"https://api.github.com/repos/PragTob/benchee/git/commits{/sha}","comments_url":"https://api.github.com/repos/PragTob/benchee/comments{/number}","issue_comment_url":"https://api.github.com/repos/PragTob/benchee/issues/comments{/number}","contents_url":"https://api.github.com/repos/PragTob/benchee/contents/{+path}","compare_url":"https://api.github.com/repos/PragTob/benchee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PragTob/benchee/merges","archive_url":"https://api.github.com/repos/PragTob/benchee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PragTob/benchee/downloads","issues_url":"https://api.github.com/repos/PragTob/benchee/issues{/number}","pulls_url":"https://api.github.com/repos/PragTob/benchee/pulls{/number}","milestones_url":"https://api.github.com/repos/PragTob/benchee/milestones{/number}","notifications_url":"https://api.github.com/repos/PragTob/benchee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PragTob/benchee/labels{/name}","releases_url":"https://api.github.com/repos/PragTob/benchee/releases{/id}","deployments_url":"https://api.github.com/repos/PragTob/benchee/deployments","created_at":"2016-05-22T18:48:43Z","updated_at":"2016-09-18T20:34:20Z","pushed_at":"2016-09-19T18:26:21Z","git_url":"git://github.com/PragTob/benchee.git","ssh_url":"git@github.com:PragTob/benchee.git","clone_url":"https://github.com/PragTob/benchee.git","svn_url":"https://github.com/PragTob/benchee","homepage":"","size":204,"stargazers_count":81,"watchers_count":81,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":12,"forks":6,"open_issues":12,"watchers":81,"default_branch":"master"}},"base":{"label":"PragTob:master","ref":"master","sha":"60639593485cccb1d49e68850a33f0bd04cc6457","user":{"login":"PragTob","id":606517,"avatar_url":"https://avatars.githubusercontent.com/u/606517?v=3","gravatar_id":"","url":"https://api.github.com/users/PragTob","html_url":"https://github.com/PragTob","followers_url":"https://api.github.com/users/PragTob/followers","following_url":"https://api.github.com/users/PragTob/following{/other_user}","gists_url":"https://api.github.com/users/PragTob/gists{/gist_id}","starred_url":"https://api.github.com/users/PragTob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PragTob/subscriptions","organizations_url":"https://api.github.com/users/PragTob/orgs","repos_url":"https://api.github.com/users/PragTob/repos","events_url":"https://api.github.com/users/PragTob/events{/privacy}","received_events_url":"https://api.github.com/users/PragTob/received_events","type":"User","site_admin":false},"repo":{"id":59428665,"name":"benchee","full_name":"PragTob/benchee","owner":{"login":"PragTob","id":606517,"avatar_url":"https://avatars.githubusercontent.com/u/606517?v=3","gravatar_id":"","url":"https://api.github.com/users/PragTob","html_url":"https://github.com/PragTob","followers_url":"https://api.github.com/users/PragTob/followers","following_url":"https://api.github.com/users/PragTob/following{/other_user}","gists_url":"https://api.github.com/users/PragTob/gists{/gist_id}","starred_url":"https://api.github.com/users/PragTob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PragTob/subscriptions","organizations_url":"https://api.github.com/users/PragTob/orgs","repos_url":"https://api.github.com/users/PragTob/repos","events_url":"https://api.github.com/users/PragTob/events{/privacy}","received_events_url":"https://api.github.com/users/PragTob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PragTob/benchee","description":"Easy and extensible benchmarking in Elixir providing you with lots of statistics!","fork":false,"url":"https://api.github.com/repos/PragTob/benchee","forks_url":"https://api.github.com/repos/PragTob/benchee/forks","keys_url":"https://api.github.com/repos/PragTob/benchee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PragTob/benchee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PragTob/benchee/teams","hooks_url":"https://api.github.com/repos/PragTob/benchee/hooks","issue_events_url":"https://api.github.com/repos/PragTob/benchee/issues/events{/number}","events_url":"https://api.github.com/repos/PragTob/benchee/events","assignees_url":"https://api.github.com/repos/PragTob/benchee/assignees{/user}","branches_url":"https://api.github.com/repos/PragTob/benchee/branches{/branch}","tags_url":"https://api.github.com/repos/PragTob/benchee/tags","blobs_url":"https://api.github.com/repos/PragTob/benchee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PragTob/benchee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PragTob/benchee/git/refs{/sha}","trees_url":"https://api.github.com/repos/PragTob/benchee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PragTob/benchee/statuses/{sha}","languages_url":"https://api.github.com/repos/PragTob/benchee/languages","stargazers_url":"https://api.github.com/repos/PragTob/benchee/stargazers","contributors_url":"https://api.github.com/repos/PragTob/benchee/contributors","subscribers_url":"https://api.github.com/repos/PragTob/benchee/subscribers","subscription_url":"https://api.github.com/repos/PragTob/benchee/subscription","commits_url":"https://api.github.com/repos/PragTob/benchee/commits{/sha}","git_commits_url":"https://api.github.com/repos/PragTob/benchee/git/commits{/sha}","comments_url":"https://api.github.com/repos/PragTob/benchee/comments{/number}","issue_comment_url":"https://api.github.com/repos/PragTob/benchee/issues/comments{/number}","contents_url":"https://api.github.com/repos/PragTob/benchee/contents/{+path}","compare_url":"https://api.github.com/repos/PragTob/benchee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PragTob/benchee/merges","archive_url":"https://api.github.com/repos/PragTob/benchee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PragTob/benchee/downloads","issues_url":"https://api.github.com/repos/PragTob/benchee/issues{/number}","pulls_url":"https://api.github.com/repos/PragTob/benchee/pulls{/number}","milestones_url":"https://api.github.com/repos/PragTob/benchee/milestones{/number}","notifications_url":"https://api.github.com/repos/PragTob/benchee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PragTob/benchee/labels{/name}","releases_url":"https://api.github.com/repos/PragTob/benchee/releases{/id}","deployments_url":"https://api.github.com/repos/PragTob/benchee/deployments","created_at":"2016-05-22T18:48:43Z","updated_at":"2016-09-18T20:34:20Z","pushed_at":"2016-09-19T18:26:21Z","git_url":"git://github.com/PragTob/benchee.git","ssh_url":"git@github.com:PragTob/benchee.git","clone_url":"https://github.com/PragTob/benchee.git","svn_url":"https://github.com/PragTob/benchee","homepage":"","size":204,"stargazers_count":81,"watchers_count":81,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":12,"forks":6,"open_issues":12,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/29"},"html":{"href":"https://github.com/PragTob/benchee/pull/29"},"issue":{"href":"https://api.github.com/repos/PragTob/benchee/issues/29"},"comments":{"href":"https://api.github.com/repos/PragTob/benchee/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PragTob/benchee/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/PragTob/benchee/statuses/95cb1900516e6d4a94a0cd2cba426ec713dc7069"}}}}
{"actor":{"display_login":"PragTob"}}