{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/41174240","id":41174240,"diff_hunk":"@@ -0,0 +1,81 @@\n+<?php\n+\n+namespace ZendBench\\ServiceManager;\n+\n+use Zend\\ServiceManager\\ServiceManager;\n+use Athletic\\AthleticEvent;\n+\n+class FetchServices extends AthleticEvent\n+{\n+    const NUM_SERVICES = 50;\n+\n+    /**\n+     * @var ServiceManager\n+     */\n+    protected $sm;\n+\n+    public function setUp()\n+    {\n+        $this->sm = new ServiceManager();\n+        // factories\n+        for ($i = 0; $i < self::NUM_SERVICES; $i++) {","path":"benchmarks/FetchServices.php","position":21,"original_position":21,"commit_id":"a4baf026e918a05bef20d8d07902673f247a5db8","original_commit_id":"a4baf026e918a05bef20d8d07902673f247a5db8","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"body":"I'd still remove them for correctness, tbh.","created_at":"2015-10-05T17:47:44Z","updated_at":"2015-10-05T17:47:44Z","html_url":"https://github.com/zendframework/zend-servicemanager/pull/34#discussion_r41174240","pull_request_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/41174240"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/34#discussion_r41174240"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34","id":46809499,"html_url":"https://github.com/zendframework/zend-servicemanager/pull/34","diff_url":"https://github.com/zendframework/zend-servicemanager/pull/34.diff","patch_url":"https://github.com/zendframework/zend-servicemanager/pull/34.patch","issue_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/34","number":34,"state":"open","locked":false,"title":"Added the first benchmarks","user":{"login":"ezimuel","id":475967,"avatar_url":"https://avatars.githubusercontent.com/u/475967?v=3","gravatar_id":"","url":"https://api.github.com/users/ezimuel","html_url":"https://github.com/ezimuel","followers_url":"https://api.github.com/users/ezimuel/followers","following_url":"https://api.github.com/users/ezimuel/following{/other_user}","gists_url":"https://api.github.com/users/ezimuel/gists{/gist_id}","starred_url":"https://api.github.com/users/ezimuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezimuel/subscriptions","organizations_url":"https://api.github.com/users/ezimuel/orgs","repos_url":"https://api.github.com/users/ezimuel/repos","events_url":"https://api.github.com/users/ezimuel/events{/privacy}","received_events_url":"https://api.github.com/users/ezimuel/received_events","type":"User","site_admin":false},"body":"This PR adds the first benchmarks for ServiceManager. I created a first round of benchmarking fetching the following services:\r\n- factories;\r\n- invokables;\r\n- alias;\r\n- services;\r\n- abstract services;\r\n\r\nThese the results of the execution on a CPU Intel i5-2500 at 3.30GHz, 8 GB RAM, Ubuntu 14.04, PHP 5.5.9:\r\n```\r\nZendBench\\ServiceManager\\FetchServices\r\n    Method Name                   Iterations   Average Time      Ops/second   \r\n    ---------------------------- ------------ ----------------- ---------------\r\n    fetchFactoryService        : [     1,000] [0.0000256531239] [38,981.60729 ]\r\n    fetchInvokableService      : [     1,000] [0.0000194692612] [51,363.01739 ]\r\n    fetchService               : [     1,000] [0.0000033619404] [297,447.27324]\r\n    fetchAliasService          : [     1,000] [0.0000141952038] [70,446.32930 ]\r\n    fetchAbstractFactoryService: [     1,000] [0.0000307886600] [32,479.49077 ]\r\n```","created_at":"2015-10-05T17:32:26Z","updated_at":"2015-10-05T17:47:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"687d05bd1a360fd00e33b4b7a3128d524173b412","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/34/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/a4baf026e918a05bef20d8d07902673f247a5db8","head":{"label":"ezimuel:feature/benchmarks","ref":"feature/benchmarks","sha":"a4baf026e918a05bef20d8d07902673f247a5db8","user":{"login":"ezimuel","id":475967,"avatar_url":"https://avatars.githubusercontent.com/u/475967?v=3","gravatar_id":"","url":"https://api.github.com/users/ezimuel","html_url":"https://github.com/ezimuel","followers_url":"https://api.github.com/users/ezimuel/followers","following_url":"https://api.github.com/users/ezimuel/following{/other_user}","gists_url":"https://api.github.com/users/ezimuel/gists{/gist_id}","starred_url":"https://api.github.com/users/ezimuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezimuel/subscriptions","organizations_url":"https://api.github.com/users/ezimuel/orgs","repos_url":"https://api.github.com/users/ezimuel/repos","events_url":"https://api.github.com/users/ezimuel/events{/privacy}","received_events_url":"https://api.github.com/users/ezimuel/received_events","type":"User","site_admin":false},"repo":{"id":43696344,"name":"zend-servicemanager","full_name":"ezimuel/zend-servicemanager","owner":{"login":"ezimuel","id":475967,"avatar_url":"https://avatars.githubusercontent.com/u/475967?v=3","gravatar_id":"","url":"https://api.github.com/users/ezimuel","html_url":"https://github.com/ezimuel","followers_url":"https://api.github.com/users/ezimuel/followers","following_url":"https://api.github.com/users/ezimuel/following{/other_user}","gists_url":"https://api.github.com/users/ezimuel/gists{/gist_id}","starred_url":"https://api.github.com/users/ezimuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezimuel/subscriptions","organizations_url":"https://api.github.com/users/ezimuel/orgs","repos_url":"https://api.github.com/users/ezimuel/repos","events_url":"https://api.github.com/users/ezimuel/events{/privacy}","received_events_url":"https://api.github.com/users/ezimuel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ezimuel/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":true,"url":"https://api.github.com/repos/ezimuel/zend-servicemanager","forks_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/ezimuel/zend-servicemanager/releases{/id}","created_at":"2015-10-05T15:58:43Z","updated_at":"2015-10-05T15:58:44Z","pushed_at":"2015-10-05T17:34:28Z","git_url":"git://github.com/ezimuel/zend-servicemanager.git","ssh_url":"git@github.com:ezimuel/zend-servicemanager.git","clone_url":"https://github.com/ezimuel/zend-servicemanager.git","svn_url":"https://github.com/ezimuel/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":2601,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"zendframework:master","ref":"master","sha":"f7225b1afbe5a78e41b98cec02f1d449087c689b","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280826,"name":"zend-servicemanager","full_name":"zendframework/zend-servicemanager","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-servicemanager","forks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/zendframework/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/zendframework/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-servicemanager/releases{/id}","created_at":"2015-05-08T13:28:10Z","updated_at":"2015-10-04T14:19:14Z","pushed_at":"2015-10-05T17:34:31Z","git_url":"git://github.com/zendframework/zend-servicemanager.git","ssh_url":"git@github.com:zendframework/zend-servicemanager.git","clone_url":"https://github.com/zendframework/zend-servicemanager.git","svn_url":"https://github.com/zendframework/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":2601,"stargazers_count":15,"watchers_count":15,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":4,"forks":16,"open_issues":4,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/34"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/34"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/a4baf026e918a05bef20d8d07902673f247a5db8"}}}}