{"action":"created","comment":{"url":"https://api.github.com/repos/griddynamics/jagger/pulls/comments/78763017","id":78763017,"diff_hunk":"@@ -90,19 +99,34 @@ public void onSessionExecuted(String sessionId, String sessionComment) {\n     public void onSessionExecuted(String sessionId, String sessionComment, SessionExecutionStatus status) {\n         Namespace namespace = Namespace.of(SESSION, sessionId);\n         Multimap<String, Object> objectsMap = HashMultimap.create();\n-        objectsMap.put(END_TIME, System.currentTimeMillis());\n+    \n+        sessionInfoProvider.setEndTime(System.currentTimeMillis());\n+        objectsMap.put(END_TIME, sessionInfoProvider.getEndTime());\n+        \n         objectsMap.put(TASK_EXECUTED, taskCounter);\n-        Integer failedTasks = taskExecutionStatusProvider.getTaskIdsWithStatus(TaskData.ExecutionStatus.FAILED).size();\n+        Integer failedTasks = getTaskCountWithStatus(TaskData.ExecutionStatus.FAILED);\n         objectsMap.put(FAILED, failedTasks);\n-        if(failedTasks > 0) {\n-            if(SessionExecutionStatus.EMPTY.equals(status)){\n+        if (failedTasks > 0) {\n+            if (SessionExecutionStatus.EMPTY.equals(status)) {\n                 status = SessionExecutionStatus.TASK_FAILED;\n             }\n         }\n         objectsMap.put(ERROR_MESSAGE, status.getMessage());\n \n         keyValueStorage.putAll(namespace, objectsMap);\n     }\n+    \n+    private int getTaskCountWithStatus(final TaskData.ExecutionStatus status) {\n+        int counter = 0;\n+        for (Task task : configuration.getTasks()) {\n+            if (task instanceof WorkloadTask) {","path":"chassis/core/src/main/java/com/griddynamics/jagger/engine/e1/collector/BasicSessionCollector.java","position":93,"original_position":93,"commit_id":"5659df7ff860dbf320497b99e031bf10bf950767","original_commit_id":"5659df7ff860dbf320497b99e031bf10bf950767","user":{"login":"anton-antonenko","id":10641625,"avatar_url":"https://avatars.githubusercontent.com/u/10641625?v=3","gravatar_id":"","url":"https://api.github.com/users/anton-antonenko","html_url":"https://github.com/anton-antonenko","followers_url":"https://api.github.com/users/anton-antonenko/followers","following_url":"https://api.github.com/users/anton-antonenko/following{/other_user}","gists_url":"https://api.github.com/users/anton-antonenko/gists{/gist_id}","starred_url":"https://api.github.com/users/anton-antonenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anton-antonenko/subscriptions","organizations_url":"https://api.github.com/users/anton-antonenko/orgs","repos_url":"https://api.github.com/users/anton-antonenko/repos","events_url":"https://api.github.com/users/anton-antonenko/events{/privacy}","received_events_url":"https://api.github.com/users/anton-antonenko/received_events","type":"User","site_admin":false},"body":"Now there's no code in between and it can be simplified, so why not?) \r\nIt's not about functionality - it's about readability and clean code","created_at":"2016-09-14T14:44:50Z","updated_at":"2016-09-14T14:44:50Z","html_url":"https://github.com/griddynamics/jagger/pull/602#discussion_r78763017","pull_request_url":"https://api.github.com/repos/griddynamics/jagger/pulls/602","_links":{"self":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/comments/78763017"},"html":{"href":"https://github.com/griddynamics/jagger/pull/602#discussion_r78763017"},"pull_request":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/602"}}},"pull_request":{"url":"https://api.github.com/repos/griddynamics/jagger/pulls/602","id":84860176,"html_url":"https://github.com/griddynamics/jagger/pull/602","diff_url":"https://github.com/griddynamics/jagger/pull/602.diff","patch_url":"https://github.com/griddynamics/jagger/pull/602.patch","issue_url":"https://api.github.com/repos/griddynamics/jagger/issues/602","number":602,"state":"open","locked":false,"title":"[JFG-853] Unified data model between Master and JaaS REST API","user":{"login":"a-badaev","id":1729467,"avatar_url":"https://avatars.githubusercontent.com/u/1729467?v=3","gravatar_id":"","url":"https://api.github.com/users/a-badaev","html_url":"https://github.com/a-badaev","followers_url":"https://api.github.com/users/a-badaev/followers","following_url":"https://api.github.com/users/a-badaev/following{/other_user}","gists_url":"https://api.github.com/users/a-badaev/gists{/gist_id}","starred_url":"https://api.github.com/users/a-badaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-badaev/subscriptions","organizations_url":"https://api.github.com/users/a-badaev/orgs","repos_url":"https://api.github.com/users/a-badaev/repos","events_url":"https://api.github.com/users/a-badaev/events{/privacy}","received_events_url":"https://api.github.com/users/a-badaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-12T12:09:23Z","updated_at":"2016-09-14T14:44:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d427d3cd733cb8c539db364ddade2f93ac3101b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/griddynamics/jagger/pulls/602/commits","review_comments_url":"https://api.github.com/repos/griddynamics/jagger/pulls/602/comments","review_comment_url":"https://api.github.com/repos/griddynamics/jagger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/griddynamics/jagger/issues/602/comments","statuses_url":"https://api.github.com/repos/griddynamics/jagger/statuses/5659df7ff860dbf320497b99e031bf10bf950767","head":{"label":"a-badaev:JFG-853-2","ref":"JFG-853-2","sha":"5659df7ff860dbf320497b99e031bf10bf950767","user":{"login":"a-badaev","id":1729467,"avatar_url":"https://avatars.githubusercontent.com/u/1729467?v=3","gravatar_id":"","url":"https://api.github.com/users/a-badaev","html_url":"https://github.com/a-badaev","followers_url":"https://api.github.com/users/a-badaev/followers","following_url":"https://api.github.com/users/a-badaev/following{/other_user}","gists_url":"https://api.github.com/users/a-badaev/gists{/gist_id}","starred_url":"https://api.github.com/users/a-badaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-badaev/subscriptions","organizations_url":"https://api.github.com/users/a-badaev/orgs","repos_url":"https://api.github.com/users/a-badaev/repos","events_url":"https://api.github.com/users/a-badaev/events{/privacy}","received_events_url":"https://api.github.com/users/a-badaev/received_events","type":"User","site_admin":false},"repo":{"id":64215621,"name":"jagger","full_name":"a-badaev/jagger","owner":{"login":"a-badaev","id":1729467,"avatar_url":"https://avatars.githubusercontent.com/u/1729467?v=3","gravatar_id":"","url":"https://api.github.com/users/a-badaev","html_url":"https://github.com/a-badaev","followers_url":"https://api.github.com/users/a-badaev/followers","following_url":"https://api.github.com/users/a-badaev/following{/other_user}","gists_url":"https://api.github.com/users/a-badaev/gists{/gist_id}","starred_url":"https://api.github.com/users/a-badaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-badaev/subscriptions","organizations_url":"https://api.github.com/users/a-badaev/orgs","repos_url":"https://api.github.com/users/a-badaev/repos","events_url":"https://api.github.com/users/a-badaev/events{/privacy}","received_events_url":"https://api.github.com/users/a-badaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a-badaev/jagger","description":"Jagger","fork":true,"url":"https://api.github.com/repos/a-badaev/jagger","forks_url":"https://api.github.com/repos/a-badaev/jagger/forks","keys_url":"https://api.github.com/repos/a-badaev/jagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a-badaev/jagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a-badaev/jagger/teams","hooks_url":"https://api.github.com/repos/a-badaev/jagger/hooks","issue_events_url":"https://api.github.com/repos/a-badaev/jagger/issues/events{/number}","events_url":"https://api.github.com/repos/a-badaev/jagger/events","assignees_url":"https://api.github.com/repos/a-badaev/jagger/assignees{/user}","branches_url":"https://api.github.com/repos/a-badaev/jagger/branches{/branch}","tags_url":"https://api.github.com/repos/a-badaev/jagger/tags","blobs_url":"https://api.github.com/repos/a-badaev/jagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a-badaev/jagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a-badaev/jagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/a-badaev/jagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a-badaev/jagger/statuses/{sha}","languages_url":"https://api.github.com/repos/a-badaev/jagger/languages","stargazers_url":"https://api.github.com/repos/a-badaev/jagger/stargazers","contributors_url":"https://api.github.com/repos/a-badaev/jagger/contributors","subscribers_url":"https://api.github.com/repos/a-badaev/jagger/subscribers","subscription_url":"https://api.github.com/repos/a-badaev/jagger/subscription","commits_url":"https://api.github.com/repos/a-badaev/jagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/a-badaev/jagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/a-badaev/jagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/a-badaev/jagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/a-badaev/jagger/contents/{+path}","compare_url":"https://api.github.com/repos/a-badaev/jagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a-badaev/jagger/merges","archive_url":"https://api.github.com/repos/a-badaev/jagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a-badaev/jagger/downloads","issues_url":"https://api.github.com/repos/a-badaev/jagger/issues{/number}","pulls_url":"https://api.github.com/repos/a-badaev/jagger/pulls{/number}","milestones_url":"https://api.github.com/repos/a-badaev/jagger/milestones{/number}","notifications_url":"https://api.github.com/repos/a-badaev/jagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a-badaev/jagger/labels{/name}","releases_url":"https://api.github.com/repos/a-badaev/jagger/releases{/id}","deployments_url":"https://api.github.com/repos/a-badaev/jagger/deployments","created_at":"2016-07-26T11:21:57Z","updated_at":"2016-07-26T11:22:00Z","pushed_at":"2016-09-12T12:01:55Z","git_url":"git://github.com/a-badaev/jagger.git","ssh_url":"git@github.com:a-badaev/jagger.git","clone_url":"https://github.com/a-badaev/jagger.git","svn_url":"https://github.com/a-badaev/jagger","homepage":"https://jagger.griddynamics.net","size":32956,"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":"griddynamics:master","ref":"master","sha":"65fb88f9116bdcf57becfc0a12078af111f3f98a","user":{"login":"griddynamics","id":54911,"avatar_url":"https://avatars.githubusercontent.com/u/54911?v=3","gravatar_id":"","url":"https://api.github.com/users/griddynamics","html_url":"https://github.com/griddynamics","followers_url":"https://api.github.com/users/griddynamics/followers","following_url":"https://api.github.com/users/griddynamics/following{/other_user}","gists_url":"https://api.github.com/users/griddynamics/gists{/gist_id}","starred_url":"https://api.github.com/users/griddynamics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griddynamics/subscriptions","organizations_url":"https://api.github.com/users/griddynamics/orgs","repos_url":"https://api.github.com/users/griddynamics/repos","events_url":"https://api.github.com/users/griddynamics/events{/privacy}","received_events_url":"https://api.github.com/users/griddynamics/received_events","type":"Organization","site_admin":false},"repo":{"id":3430789,"name":"jagger","full_name":"griddynamics/jagger","owner":{"login":"griddynamics","id":54911,"avatar_url":"https://avatars.githubusercontent.com/u/54911?v=3","gravatar_id":"","url":"https://api.github.com/users/griddynamics","html_url":"https://github.com/griddynamics","followers_url":"https://api.github.com/users/griddynamics/followers","following_url":"https://api.github.com/users/griddynamics/following{/other_user}","gists_url":"https://api.github.com/users/griddynamics/gists{/gist_id}","starred_url":"https://api.github.com/users/griddynamics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griddynamics/subscriptions","organizations_url":"https://api.github.com/users/griddynamics/orgs","repos_url":"https://api.github.com/users/griddynamics/repos","events_url":"https://api.github.com/users/griddynamics/events{/privacy}","received_events_url":"https://api.github.com/users/griddynamics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/griddynamics/jagger","description":"Jagger","fork":false,"url":"https://api.github.com/repos/griddynamics/jagger","forks_url":"https://api.github.com/repos/griddynamics/jagger/forks","keys_url":"https://api.github.com/repos/griddynamics/jagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/griddynamics/jagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/griddynamics/jagger/teams","hooks_url":"https://api.github.com/repos/griddynamics/jagger/hooks","issue_events_url":"https://api.github.com/repos/griddynamics/jagger/issues/events{/number}","events_url":"https://api.github.com/repos/griddynamics/jagger/events","assignees_url":"https://api.github.com/repos/griddynamics/jagger/assignees{/user}","branches_url":"https://api.github.com/repos/griddynamics/jagger/branches{/branch}","tags_url":"https://api.github.com/repos/griddynamics/jagger/tags","blobs_url":"https://api.github.com/repos/griddynamics/jagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/griddynamics/jagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/griddynamics/jagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/griddynamics/jagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/griddynamics/jagger/statuses/{sha}","languages_url":"https://api.github.com/repos/griddynamics/jagger/languages","stargazers_url":"https://api.github.com/repos/griddynamics/jagger/stargazers","contributors_url":"https://api.github.com/repos/griddynamics/jagger/contributors","subscribers_url":"https://api.github.com/repos/griddynamics/jagger/subscribers","subscription_url":"https://api.github.com/repos/griddynamics/jagger/subscription","commits_url":"https://api.github.com/repos/griddynamics/jagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/griddynamics/jagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/griddynamics/jagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/griddynamics/jagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/griddynamics/jagger/contents/{+path}","compare_url":"https://api.github.com/repos/griddynamics/jagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/griddynamics/jagger/merges","archive_url":"https://api.github.com/repos/griddynamics/jagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/griddynamics/jagger/downloads","issues_url":"https://api.github.com/repos/griddynamics/jagger/issues{/number}","pulls_url":"https://api.github.com/repos/griddynamics/jagger/pulls{/number}","milestones_url":"https://api.github.com/repos/griddynamics/jagger/milestones{/number}","notifications_url":"https://api.github.com/repos/griddynamics/jagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/griddynamics/jagger/labels{/name}","releases_url":"https://api.github.com/repos/griddynamics/jagger/releases{/id}","deployments_url":"https://api.github.com/repos/griddynamics/jagger/deployments","created_at":"2012-02-13T14:47:01Z","updated_at":"2016-08-22T09:30:10Z","pushed_at":"2016-09-14T14:28:12Z","git_url":"git://github.com/griddynamics/jagger.git","ssh_url":"git@github.com:griddynamics/jagger.git","clone_url":"https://github.com/griddynamics/jagger.git","svn_url":"https://github.com/griddynamics/jagger","homepage":"https://jagger.griddynamics.net","size":33622,"stargazers_count":39,"watchers_count":39,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":30,"forks":36,"open_issues":30,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/602"},"html":{"href":"https://github.com/griddynamics/jagger/pull/602"},"issue":{"href":"https://api.github.com/repos/griddynamics/jagger/issues/602"},"comments":{"href":"https://api.github.com/repos/griddynamics/jagger/issues/602/comments"},"review_comments":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/602/comments"},"review_comment":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/griddynamics/jagger/pulls/602/commits"},"statuses":{"href":"https://api.github.com/repos/griddynamics/jagger/statuses/5659df7ff860dbf320497b99e031bf10bf950767"}}}}
{"actor":{"display_login":"anton-antonenko"}}