{"action":"created","comment":{"url":"https://api.github.com/repos/manastech/crystal/pulls/comments/32870215","id":32870215,"diff_hunk":"@@ -1,3 +1,47 @@\n+# A Performance Benchmarking Library\n+# Overview\n+#\n+# The Benchmark module provides methods for benchmarking Ruby code, giving\n+# detailed reports on the time taken for each task.\n+#\n+\n+# The Benchmark module provides methods to measure and report the time\n+# used to execute Ruby code.\n+#\n+# * Measure the time to construct the string given by the expression\n+#   <code>\"a\"*1_000_000_000</code>:\n+#\n+#       require 'benchmark'\n+#\n+#       puts Benchmark.measure { \"a\"*1_000_000_000 }\n+#\n+#   On my machine (OSX 10.10.3 on i7 2.2 Ghz) this generates:\n+#\n+#        0.190000   0.220000   0.410000 (  0.420185)\n+#\n+#   This report shows the user CPU time, system CPU time, the sum of\n+#   the user and system CPU times, and the elapsed real time. The unit\n+#   of time is seconds.\n+\n+# * Do some experiments sequentially using the #bm method:\n+#\n+#       require 'benchmark'\n+#\n+#       n = 5000000\n+#       Benchmark.bm do |x|\n+#         x.report { n.times do   ; a = \"1\"; end }\n+#         x.report { 1.upto(n) do ; a = \"1\"; end }","path":"src/benchmark.cr","position":null,"original_position":33,"commit_id":"8c1dc57806078ab848842a23364883c590a053ef","original_commit_id":"baeb230473e48e3a89c0b2096f9dcb66d2208c01","user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"body":"Thanks!\r\n\r\nBut there's still @rhysd comment, `require 'benchmark'` (note the single quotes) is not valid Crystal code. Are you sure you tested this code? I mean, not test that the documentation generates well, but that the code samples compile and work.","created_at":"2015-06-19T21:18:13Z","updated_at":"2015-06-19T21:18:13Z","html_url":"https://github.com/manastech/crystal/pull/831#discussion_r32870215","pull_request_url":"https://api.github.com/repos/manastech/crystal/pulls/831","_links":{"self":{"href":"https://api.github.com/repos/manastech/crystal/pulls/comments/32870215"},"html":{"href":"https://github.com/manastech/crystal/pull/831#discussion_r32870215"},"pull_request":{"href":"https://api.github.com/repos/manastech/crystal/pulls/831"}}},"pull_request":{"url":"https://api.github.com/repos/manastech/crystal/pulls/831","id":38109431,"html_url":"https://github.com/manastech/crystal/pull/831","diff_url":"https://github.com/manastech/crystal/pull/831.diff","patch_url":"https://github.com/manastech/crystal/pull/831.patch","issue_url":"https://api.github.com/repos/manastech/crystal/issues/831","number":831,"state":"open","locked":false,"title":"Documenting of benchmark","user":{"login":"daneb","id":1150821,"avatar_url":"https://avatars.githubusercontent.com/u/1150821?v=3","gravatar_id":"","url":"https://api.github.com/users/daneb","html_url":"https://github.com/daneb","followers_url":"https://api.github.com/users/daneb/followers","following_url":"https://api.github.com/users/daneb/following{/other_user}","gists_url":"https://api.github.com/users/daneb/gists{/gist_id}","starred_url":"https://api.github.com/users/daneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneb/subscriptions","organizations_url":"https://api.github.com/users/daneb/orgs","repos_url":"https://api.github.com/users/daneb/repos","events_url":"https://api.github.com/users/daneb/events{/privacy}","received_events_url":"https://api.github.com/users/daneb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-19T13:53:25Z","updated_at":"2015-06-19T21:18:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a76a24f030a47fb29bf682ef7ef77958431885e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/manastech/crystal/pulls/831/commits","review_comments_url":"https://api.github.com/repos/manastech/crystal/pulls/831/comments","review_comment_url":"https://api.github.com/repos/manastech/crystal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/831/comments","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/8c1dc57806078ab848842a23364883c590a053ef","head":{"label":"daneb:db_benchmark_doc","ref":"db_benchmark_doc","sha":"8c1dc57806078ab848842a23364883c590a053ef","user":{"login":"daneb","id":1150821,"avatar_url":"https://avatars.githubusercontent.com/u/1150821?v=3","gravatar_id":"","url":"https://api.github.com/users/daneb","html_url":"https://github.com/daneb","followers_url":"https://api.github.com/users/daneb/followers","following_url":"https://api.github.com/users/daneb/following{/other_user}","gists_url":"https://api.github.com/users/daneb/gists{/gist_id}","starred_url":"https://api.github.com/users/daneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneb/subscriptions","organizations_url":"https://api.github.com/users/daneb/orgs","repos_url":"https://api.github.com/users/daneb/repos","events_url":"https://api.github.com/users/daneb/events{/privacy}","received_events_url":"https://api.github.com/users/daneb/received_events","type":"User","site_admin":false},"repo":{"id":37718796,"name":"crystal","full_name":"daneb/crystal","owner":{"login":"daneb","id":1150821,"avatar_url":"https://avatars.githubusercontent.com/u/1150821?v=3","gravatar_id":"","url":"https://api.github.com/users/daneb","html_url":"https://github.com/daneb","followers_url":"https://api.github.com/users/daneb/followers","following_url":"https://api.github.com/users/daneb/following{/other_user}","gists_url":"https://api.github.com/users/daneb/gists{/gist_id}","starred_url":"https://api.github.com/users/daneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daneb/subscriptions","organizations_url":"https://api.github.com/users/daneb/orgs","repos_url":"https://api.github.com/users/daneb/repos","events_url":"https://api.github.com/users/daneb/events{/privacy}","received_events_url":"https://api.github.com/users/daneb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daneb/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/daneb/crystal","forks_url":"https://api.github.com/repos/daneb/crystal/forks","keys_url":"https://api.github.com/repos/daneb/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daneb/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daneb/crystal/teams","hooks_url":"https://api.github.com/repos/daneb/crystal/hooks","issue_events_url":"https://api.github.com/repos/daneb/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/daneb/crystal/events","assignees_url":"https://api.github.com/repos/daneb/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/daneb/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/daneb/crystal/tags","blobs_url":"https://api.github.com/repos/daneb/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daneb/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daneb/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/daneb/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daneb/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/daneb/crystal/languages","stargazers_url":"https://api.github.com/repos/daneb/crystal/stargazers","contributors_url":"https://api.github.com/repos/daneb/crystal/contributors","subscribers_url":"https://api.github.com/repos/daneb/crystal/subscribers","subscription_url":"https://api.github.com/repos/daneb/crystal/subscription","commits_url":"https://api.github.com/repos/daneb/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/daneb/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/daneb/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/daneb/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/daneb/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/daneb/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daneb/crystal/merges","archive_url":"https://api.github.com/repos/daneb/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daneb/crystal/downloads","issues_url":"https://api.github.com/repos/daneb/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/daneb/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/daneb/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/daneb/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daneb/crystal/labels{/name}","releases_url":"https://api.github.com/repos/daneb/crystal/releases{/id}","created_at":"2015-06-19T11:43:25Z","updated_at":"2015-06-19T11:43:27Z","pushed_at":"2015-06-19T19:48:47Z","git_url":"git://github.com/daneb/crystal.git","ssh_url":"git@github.com:daneb/crystal.git","clone_url":"https://github.com/daneb/crystal.git","svn_url":"https://github.com/daneb/crystal","homepage":"http://crystal-lang.org","size":37118,"stargazers_count":0,"watchers_count":0,"language":"Crystal","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"manastech:master","ref":"master","sha":"4e60e2ee57ef625706de6eb55580421d105a50ae","user":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"name":"crystal","full_name":"manastech/crystal","owner":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manastech/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/manastech/crystal","forks_url":"https://api.github.com/repos/manastech/crystal/forks","keys_url":"https://api.github.com/repos/manastech/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manastech/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manastech/crystal/teams","hooks_url":"https://api.github.com/repos/manastech/crystal/hooks","issue_events_url":"https://api.github.com/repos/manastech/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/manastech/crystal/events","assignees_url":"https://api.github.com/repos/manastech/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/manastech/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/manastech/crystal/tags","blobs_url":"https://api.github.com/repos/manastech/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manastech/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manastech/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/manastech/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/manastech/crystal/languages","stargazers_url":"https://api.github.com/repos/manastech/crystal/stargazers","contributors_url":"https://api.github.com/repos/manastech/crystal/contributors","subscribers_url":"https://api.github.com/repos/manastech/crystal/subscribers","subscription_url":"https://api.github.com/repos/manastech/crystal/subscription","commits_url":"https://api.github.com/repos/manastech/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/manastech/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/manastech/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/manastech/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/manastech/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/manastech/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manastech/crystal/merges","archive_url":"https://api.github.com/repos/manastech/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manastech/crystal/downloads","issues_url":"https://api.github.com/repos/manastech/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/manastech/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/manastech/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/manastech/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manastech/crystal/labels{/name}","releases_url":"https://api.github.com/repos/manastech/crystal/releases{/id}","created_at":"2012-11-27T17:32:32Z","updated_at":"2015-06-19T18:46:35Z","pushed_at":"2015-06-19T20:49:17Z","git_url":"git://github.com/manastech/crystal.git","ssh_url":"git@github.com:manastech/crystal.git","clone_url":"https://github.com/manastech/crystal.git","svn_url":"https://github.com/manastech/crystal","homepage":"http://crystal-lang.org","size":37118,"stargazers_count":2338,"watchers_count":2338,"language":"Crystal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":143,"mirror_url":null,"open_issues_count":140,"forks":143,"open_issues":140,"watchers":2338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manastech/crystal/pulls/831"},"html":{"href":"https://github.com/manastech/crystal/pull/831"},"issue":{"href":"https://api.github.com/repos/manastech/crystal/issues/831"},"comments":{"href":"https://api.github.com/repos/manastech/crystal/issues/831/comments"},"review_comments":{"href":"https://api.github.com/repos/manastech/crystal/pulls/831/comments"},"review_comment":{"href":"https://api.github.com/repos/manastech/crystal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manastech/crystal/pulls/831/commits"},"statuses":{"href":"https://api.github.com/repos/manastech/crystal/statuses/8c1dc57806078ab848842a23364883c590a053ef"}}}}