{"action":"created","comment":{"url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/comments/81371167","pull_request_review_id":2356570,"id":81371167,"diff_hunk":"@@ -58,9 +75,66 @@ public void reportDockerEnvironment(@Observes AfterAutoStart event, CubeDockerCo\n         docker.getPropertyEntries().add(containersComposition);\n \n         propertyReportEvent.fire(new PropertyReportEvent(docker));\n+    }\n+\n+    public void reportContainerStatsBeforeTest(@Observes Before before, DockerClientExecutor executor) {\n+        generateStats(executor, false, \"Before\");\n+    }\n+\n+    public void reportContainerStatsAfterTest(@Observes After after, DockerClientExecutor executor, ReporterConfiguration configuration) {\n+        generateStats(executor, false, \"After\");\n+    }\n+\n+    private void generateStats(DockerClientExecutor executor, Boolean decimal, String when) {\n+        if (executor != null) {\n+            List<Cube<?>> containers = cubeRegistryInstance.get().getCubes();\n \n+            GroupEntry containersStat = new GroupEntry(\"Container Statistics \" + when + \" Method\");\n+\n+            for (Cube<?> container : containers) {\n+                String name = container.getId();\n+                Statistics statistics = executor.statsContainer(name);\n+                Map<String, Map> stats = getStats(statistics, decimal);\n+                containersStat.getPropertyEntries().add(createContainerStatGroup(stats, name));\n+            }\n+            propertyReportEvent.fire(new PropertyReportEvent(containersStat));\n+        }\n+    }\n+\n+    private GroupEntry createContainerStatGroup(Map<String, Map> stats, String id) {\n+\n+        GroupEntry containerStatsInfo = new GroupEntry(id + \" Statistics\");\n+\n+        for (Map.Entry<String, Map> stat : stats.entrySet()) {\n+            GroupEntry info = new GroupEntry(stat.getKey() + \" statistics\");\n+            for(Object entry : stat.getValue().entrySet()){\n+                Map.Entry castEntry = (Map.Entry) entry;\n+                addEntry(new KeyValueEntry(castEntry.getKey().toString(),castEntry.getValue().toString()), info);\n+            }\n+            containerStatsInfo.getPropertyEntries().add(info);\n+         }\n+\n+        return containerStatsInfo;\n     }\n \n+   public void reportLogs(@Observes org.arquillian.cube.spi.event.lifecycle.BeforeStop beforeStop, DockerClientExecutor executor, ReporterConfiguration reporterConfiguration) {\n+        final String cubeId = beforeStop.getCubeId();\n+        if (cubeId != null) {\n+            final File logFile = new File(reporterConfiguration.getRootDir(), cubeId + \".log\");\n+            try {\n+                executor.copyLog(beforeStop.getCubeId(), false, true, true, false, -1, new FileOutputStream(logFile));\n+            } catch (IOException e) {\n+                e.printStackTrace();\n+            }\n+            FileEntry fileEntry = new FileEntry();\n+            fileEntry.setPath(logFile.getPath());\n+            fileEntry.setType(\".log\");","path":"docker/recorder/src/main/java/org/arquillian/cube/docker/impl/client/reporter/TakeDockerEnvironment.java","position":117,"original_position":117,"commit_id":"4709899931c8371f53aefc9bb80b4c49ef066a81","original_commit_id":"4709899931c8371f53aefc9bb80b4c49ef066a81","user":{"login":"bartoszmajsak","id":719616,"avatar_url":"https://avatars.githubusercontent.com/u/719616?v=3","gravatar_id":"","url":"https://api.github.com/users/bartoszmajsak","html_url":"https://github.com/bartoszmajsak","followers_url":"https://api.github.com/users/bartoszmajsak/followers","following_url":"https://api.github.com/users/bartoszmajsak/following{/other_user}","gists_url":"https://api.github.com/users/bartoszmajsak/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszmajsak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszmajsak/subscriptions","organizations_url":"https://api.github.com/users/bartoszmajsak/orgs","repos_url":"https://api.github.com/users/bartoszmajsak/repos","events_url":"https://api.github.com/users/bartoszmajsak/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszmajsak/received_events","type":"User","site_admin":false},"body":"Why `type` is a string? What is it used for? ","created_at":"2016-09-30T16:22:34Z","updated_at":"2016-09-30T16:23:03Z","html_url":"https://github.com/arquillian/arquillian-cube/pull/459#discussion_r81371167","pull_request_url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459","_links":{"self":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/comments/81371167"},"html":{"href":"https://github.com/arquillian/arquillian-cube/pull/459#discussion_r81371167"},"pull_request":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459"}}},"pull_request":{"url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459","id":87495786,"html_url":"https://github.com/arquillian/arquillian-cube/pull/459","diff_url":"https://github.com/arquillian/arquillian-cube/pull/459.diff","patch_url":"https://github.com/arquillian/arquillian-cube/pull/459.patch","issue_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/459","number":459,"state":"open","locked":false,"title":"Adds more reporting field for cube.","user":{"login":"dipak-pawar","id":7941617,"avatar_url":"https://avatars.githubusercontent.com/u/7941617?v=3","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-30T13:42:10Z","updated_at":"2016-09-30T16:23:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f76158ed036827234ac23755b2bd8b7adfca4c35","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459/commits","review_comments_url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459/comments","review_comment_url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/459/comments","statuses_url":"https://api.github.com/repos/arquillian/arquillian-cube/statuses/4709899931c8371f53aefc9bb80b4c49ef066a81","head":{"label":"dipak-pawar:cube-reporting","ref":"cube-reporting","sha":"4709899931c8371f53aefc9bb80b4c49ef066a81","user":{"login":"dipak-pawar","id":7941617,"avatar_url":"https://avatars.githubusercontent.com/u/7941617?v=3","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"repo":{"id":68993085,"name":"arquillian-cube","full_name":"dipak-pawar/arquillian-cube","owner":{"login":"dipak-pawar","id":7941617,"avatar_url":"https://avatars.githubusercontent.com/u/7941617?v=3","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dipak-pawar/arquillian-cube","description":"Arquillian Docker","fork":true,"url":"https://api.github.com/repos/dipak-pawar/arquillian-cube","forks_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/forks","keys_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/teams","hooks_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/hooks","issue_events_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/issues/events{/number}","events_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/events","assignees_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/assignees{/user}","branches_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/branches{/branch}","tags_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/tags","blobs_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/git/refs{/sha}","trees_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/statuses/{sha}","languages_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/languages","stargazers_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/stargazers","contributors_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/contributors","subscribers_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/subscribers","subscription_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/subscription","commits_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/commits{/sha}","git_commits_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/git/commits{/sha}","comments_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/comments{/number}","issue_comment_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/issues/comments{/number}","contents_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/contents/{+path}","compare_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/merges","archive_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/downloads","issues_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/issues{/number}","pulls_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/pulls{/number}","milestones_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/milestones{/number}","notifications_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/labels{/name}","releases_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/releases{/id}","deployments_url":"https://api.github.com/repos/dipak-pawar/arquillian-cube/deployments","created_at":"2016-09-23T05:48:59Z","updated_at":"2016-09-23T05:49:01Z","pushed_at":"2016-09-30T13:41:32Z","git_url":"git://github.com/dipak-pawar/arquillian-cube.git","ssh_url":"git@github.com:dipak-pawar/arquillian-cube.git","clone_url":"https://github.com/dipak-pawar/arquillian-cube.git","svn_url":"https://github.com/dipak-pawar/arquillian-cube","homepage":null,"size":1653,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"arquillian:master","ref":"master","sha":"cf471899622e3303a269305eb1524981a868da44","user":{"login":"arquillian","id":330981,"avatar_url":"https://avatars.githubusercontent.com/u/330981?v=3","gravatar_id":"","url":"https://api.github.com/users/arquillian","html_url":"https://github.com/arquillian","followers_url":"https://api.github.com/users/arquillian/followers","following_url":"https://api.github.com/users/arquillian/following{/other_user}","gists_url":"https://api.github.com/users/arquillian/gists{/gist_id}","starred_url":"https://api.github.com/users/arquillian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arquillian/subscriptions","organizations_url":"https://api.github.com/users/arquillian/orgs","repos_url":"https://api.github.com/users/arquillian/repos","events_url":"https://api.github.com/users/arquillian/events{/privacy}","received_events_url":"https://api.github.com/users/arquillian/received_events","type":"Organization","site_admin":false},"repo":{"id":25573964,"name":"arquillian-cube","full_name":"arquillian/arquillian-cube","owner":{"login":"arquillian","id":330981,"avatar_url":"https://avatars.githubusercontent.com/u/330981?v=3","gravatar_id":"","url":"https://api.github.com/users/arquillian","html_url":"https://github.com/arquillian","followers_url":"https://api.github.com/users/arquillian/followers","following_url":"https://api.github.com/users/arquillian/following{/other_user}","gists_url":"https://api.github.com/users/arquillian/gists{/gist_id}","starred_url":"https://api.github.com/users/arquillian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arquillian/subscriptions","organizations_url":"https://api.github.com/users/arquillian/orgs","repos_url":"https://api.github.com/users/arquillian/repos","events_url":"https://api.github.com/users/arquillian/events{/privacy}","received_events_url":"https://api.github.com/users/arquillian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/arquillian/arquillian-cube","description":"Arquillian Docker","fork":false,"url":"https://api.github.com/repos/arquillian/arquillian-cube","forks_url":"https://api.github.com/repos/arquillian/arquillian-cube/forks","keys_url":"https://api.github.com/repos/arquillian/arquillian-cube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arquillian/arquillian-cube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arquillian/arquillian-cube/teams","hooks_url":"https://api.github.com/repos/arquillian/arquillian-cube/hooks","issue_events_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/events{/number}","events_url":"https://api.github.com/repos/arquillian/arquillian-cube/events","assignees_url":"https://api.github.com/repos/arquillian/arquillian-cube/assignees{/user}","branches_url":"https://api.github.com/repos/arquillian/arquillian-cube/branches{/branch}","tags_url":"https://api.github.com/repos/arquillian/arquillian-cube/tags","blobs_url":"https://api.github.com/repos/arquillian/arquillian-cube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arquillian/arquillian-cube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arquillian/arquillian-cube/git/refs{/sha}","trees_url":"https://api.github.com/repos/arquillian/arquillian-cube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arquillian/arquillian-cube/statuses/{sha}","languages_url":"https://api.github.com/repos/arquillian/arquillian-cube/languages","stargazers_url":"https://api.github.com/repos/arquillian/arquillian-cube/stargazers","contributors_url":"https://api.github.com/repos/arquillian/arquillian-cube/contributors","subscribers_url":"https://api.github.com/repos/arquillian/arquillian-cube/subscribers","subscription_url":"https://api.github.com/repos/arquillian/arquillian-cube/subscription","commits_url":"https://api.github.com/repos/arquillian/arquillian-cube/commits{/sha}","git_commits_url":"https://api.github.com/repos/arquillian/arquillian-cube/git/commits{/sha}","comments_url":"https://api.github.com/repos/arquillian/arquillian-cube/comments{/number}","issue_comment_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/comments{/number}","contents_url":"https://api.github.com/repos/arquillian/arquillian-cube/contents/{+path}","compare_url":"https://api.github.com/repos/arquillian/arquillian-cube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arquillian/arquillian-cube/merges","archive_url":"https://api.github.com/repos/arquillian/arquillian-cube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arquillian/arquillian-cube/downloads","issues_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues{/number}","pulls_url":"https://api.github.com/repos/arquillian/arquillian-cube/pulls{/number}","milestones_url":"https://api.github.com/repos/arquillian/arquillian-cube/milestones{/number}","notifications_url":"https://api.github.com/repos/arquillian/arquillian-cube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arquillian/arquillian-cube/labels{/name}","releases_url":"https://api.github.com/repos/arquillian/arquillian-cube/releases{/id}","deployments_url":"https://api.github.com/repos/arquillian/arquillian-cube/deployments","created_at":"2014-10-22T09:47:10Z","updated_at":"2016-09-29T03:20:55Z","pushed_at":"2016-09-30T13:42:10Z","git_url":"git://github.com/arquillian/arquillian-cube.git","ssh_url":"git@github.com:arquillian/arquillian-cube.git","clone_url":"https://github.com/arquillian/arquillian-cube.git","svn_url":"https://github.com/arquillian/arquillian-cube","homepage":null,"size":1799,"stargazers_count":49,"watchers_count":49,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":45,"mirror_url":null,"open_issues_count":36,"forks":45,"open_issues":36,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459"},"html":{"href":"https://github.com/arquillian/arquillian-cube/pull/459"},"issue":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/issues/459"},"comments":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/issues/459/comments"},"review_comments":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459/comments"},"review_comment":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/pulls/459/commits"},"statuses":{"href":"https://api.github.com/repos/arquillian/arquillian-cube/statuses/4709899931c8371f53aefc9bb80b4c49ef066a81"}}}}
{"actor":{"display_login":"bartoszmajsak"}}