{"action":"created","comment":{"url":"https://api.github.com/repos/radargun/radargun/pulls/comments/36067307","id":36067307,"diff_hunk":"@@ -266,110 +183,46 @@ private double toMillis(double nanos) {\n       return nanos / TimeUnit.MILLISECONDS.toNanos(1);\n    }\n \n-   protected void writeOperation(final String operation, Map<Report, List<Aggregation>> reportAggregationMap, String singleTestName) {\n-      Collection<StatisticType> presentedStatistics = new ArrayList<>();\n-      presentedStatistics.add(StatisticType.MEAN_AND_DEV);\n-      if (configuration.percentiles.length > 0 && hasRepresentation(operation, reportAggregationMap, Percentile.class, configuration.percentiles[0])) {\n-         presentedStatistics.add(StatisticType.PERCENTILES);\n-      }\n-      if (hasRepresentation(operation, reportAggregationMap, Histogram.class, configuration.histogramBuckets, configuration.histogramPercentile)) {\n-         presentedStatistics.add(StatisticType.HISTOGRAM);\n-      }\n-      if (hasRepresentation(operation, reportAggregationMap, OperationThroughput.class, 1L)) {\n-         presentedStatistics.add(StatisticType.OPERATION_THROUGHPUT);\n-      }\n-      if (hasRepresentation(operation, reportAggregationMap, DataThroughput.class, 100L, 100L, 100L, 100.0)) {\n-         presentedStatistics.add(StatisticType.DATA_THROUGHPUT);\n-      }\n+   //helper class for FreeMarker template\n+   public class OperationData {\n+      private List<String> iterationValues;\n+      private Collection<StatisticType> presentedStatistics;\n \n-      List<String> iterations = new ArrayList<>(maxIterations);\n-      for (int iteration = 0; iteration < maxIterations; ++iteration) {\n-         // in fact we shouldn't have different iterations values for iterations with the same id,\n-         // but it's possible\n-         Set<String> iterationValues = new HashSet<>();\n-         for (List<Aggregation> aggregations : reportAggregationMap.values()) {\n-            if (aggregations != null && iteration < aggregations.size()) {\n-               Aggregation aggregation = aggregations.get(iteration);\n-               if (aggregation != null && aggregation.iteration.getValue() != null) {\n-                  iterationValues.add(aggregation.iteration.test.iterationsName + \" = \" + aggregation.iteration.getValue());\n-               }\n-            }\n-         }\n-         iterations.add(concatOrDefault(iterationValues, \"iteration \" + String.valueOf(iteration)));\n+      public OperationData(Collection<StatisticType> presentedStatistics, List<String> iterationValues) {\n+         this.presentedStatistics = presentedStatistics;\n+         this.iterationValues = iterationValues;\n       }\n \n-      writeOperationHeader(iterations, presentedStatistics, singleTestName);\n-      for (Map.Entry<Report, List<Aggregation>> entry : reportAggregationMap.entrySet()) {\n-         writeOperationLine(operation, presentedStatistics, entry.getKey(), entry.getValue());\n+      public List<String> getIterationValues() {\n+         return iterationValues;\n       }\n-      write(\"</table><br>\\n\");\n \n-      for (Future f : chartTaskFutures) {\n-         try {\n-            f.get();\n-         } catch (Exception e) {\n-            log.error(\"Failed to create chart\", e);\n-         }\n+      public Collection<StatisticType> getPresentedStatistics() {\n+         return presentedStatistics;\n       }\n-      chartTaskFutures.clear();\n    }\n \n-   private void writeOperationLine(String operation, Collection<StatisticType> presentedStatistics, Report report, List<Aggregation> aggregations) {\n-      int nodeCount = aggregations.isEmpty() ? 0 : aggregations.get(0).nodeStats.size();\n-      int expandableRows = 0;\n-      if (configuration.generateNodeStats) {\n-         expandableRows += nodeCount;\n-         if (configuration.generateThreadStats) {\n-            for (int node = 0; node < nodeCount; ++node) {\n-               expandableRows += getMaxThreads(aggregations, node);\n-            }\n-         }\n-      }\n+   public Class defaultOutcomeClass() {\n+      return DefaultOutcome.class;","path":"reporters/reporter-default/src/main/java/org/radargun/reporting/html/ReportDocument.java","position":286,"original_position":286,"commit_id":"3fdf5382dc7e5d8e5cbfb1ac11d365b758a9847c","original_commit_id":"3fdf5382dc7e5d8e5cbfb1ac11d365b758a9847c","user":{"login":"vchepeli","id":1727278,"avatar_url":"https://avatars.githubusercontent.com/u/1727278?v=3","gravatar_id":"","url":"https://api.github.com/users/vchepeli","html_url":"https://github.com/vchepeli","followers_url":"https://api.github.com/users/vchepeli/followers","following_url":"https://api.github.com/users/vchepeli/following{/other_user}","gists_url":"https://api.github.com/users/vchepeli/gists{/gist_id}","starred_url":"https://api.github.com/users/vchepeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchepeli/subscriptions","organizations_url":"https://api.github.com/users/vchepeli/orgs","repos_url":"https://api.github.com/users/vchepeli/repos","events_url":"https://api.github.com/users/vchepeli/events{/privacy}","received_events_url":"https://api.github.com/users/vchepeli/received_events","type":"User","site_admin":false},"body":"not used. You should not create method for this or you need value for injecting into template? ","created_at":"2015-08-03T09:06:36Z","updated_at":"2015-08-03T09:06:36Z","html_url":"https://github.com/radargun/radargun/pull/248#discussion_r36067307","pull_request_url":"https://api.github.com/repos/radargun/radargun/pulls/248","_links":{"self":{"href":"https://api.github.com/repos/radargun/radargun/pulls/comments/36067307"},"html":{"href":"https://github.com/radargun/radargun/pull/248#discussion_r36067307"},"pull_request":{"href":"https://api.github.com/repos/radargun/radargun/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/radargun/radargun/pulls/248","id":41210955,"html_url":"https://github.com/radargun/radargun/pull/248","diff_url":"https://github.com/radargun/radargun/pull/248.diff","patch_url":"https://github.com/radargun/radargun/pull/248.patch","issue_url":"https://api.github.com/repos/radargun/radargun/issues/248","number":248,"state":"open","locked":false,"title":"HTML reporting using FreeMarker templates","user":{"login":"rmacor","id":8191057,"avatar_url":"https://avatars.githubusercontent.com/u/8191057?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacor","html_url":"https://github.com/rmacor","followers_url":"https://api.github.com/users/rmacor/followers","following_url":"https://api.github.com/users/rmacor/following{/other_user}","gists_url":"https://api.github.com/users/rmacor/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacor/subscriptions","organizations_url":"https://api.github.com/users/rmacor/orgs","repos_url":"https://api.github.com/users/rmacor/repos","events_url":"https://api.github.com/users/rmacor/events{/privacy}","received_events_url":"https://api.github.com/users/rmacor/received_events","type":"User","site_admin":false},"body":"HTML reporting redone using FreeMarker templates. Output HTML is the same as in the previous version.\r\n\r\ncloses #234 ","created_at":"2015-07-30T08:53:21Z","updated_at":"2015-08-03T09:06:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b30b38c651100d034ce477cf086e2eaf714ecc0a","assignee":{"login":"mcimbora","id":4274233,"avatar_url":"https://avatars.githubusercontent.com/u/4274233?v=3","gravatar_id":"","url":"https://api.github.com/users/mcimbora","html_url":"https://github.com/mcimbora","followers_url":"https://api.github.com/users/mcimbora/followers","following_url":"https://api.github.com/users/mcimbora/following{/other_user}","gists_url":"https://api.github.com/users/mcimbora/gists{/gist_id}","starred_url":"https://api.github.com/users/mcimbora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcimbora/subscriptions","organizations_url":"https://api.github.com/users/mcimbora/orgs","repos_url":"https://api.github.com/users/mcimbora/repos","events_url":"https://api.github.com/users/mcimbora/events{/privacy}","received_events_url":"https://api.github.com/users/mcimbora/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/radargun/radargun/milestones/4","html_url":"https://github.com/radargun/radargun/milestones/3.0.0","labels_url":"https://api.github.com/repos/radargun/radargun/milestones/4/labels","id":1160444,"number":4,"title":"3.0.0","description":null,"creator":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-06-11T14:54:56Z","updated_at":"2015-07-30T08:56:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/radargun/radargun/pulls/248/commits","review_comments_url":"https://api.github.com/repos/radargun/radargun/pulls/248/comments","review_comment_url":"https://api.github.com/repos/radargun/radargun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radargun/radargun/issues/248/comments","statuses_url":"https://api.github.com/repos/radargun/radargun/statuses/3fdf5382dc7e5d8e5cbfb1ac11d365b758a9847c","head":{"label":"rmacor:reporting","ref":"reporting","sha":"3fdf5382dc7e5d8e5cbfb1ac11d365b758a9847c","user":{"login":"rmacor","id":8191057,"avatar_url":"https://avatars.githubusercontent.com/u/8191057?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacor","html_url":"https://github.com/rmacor","followers_url":"https://api.github.com/users/rmacor/followers","following_url":"https://api.github.com/users/rmacor/following{/other_user}","gists_url":"https://api.github.com/users/rmacor/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacor/subscriptions","organizations_url":"https://api.github.com/users/rmacor/orgs","repos_url":"https://api.github.com/users/rmacor/repos","events_url":"https://api.github.com/users/rmacor/events{/privacy}","received_events_url":"https://api.github.com/users/rmacor/received_events","type":"User","site_admin":false},"repo":{"id":39938988,"name":"radargun","full_name":"rmacor/radargun","owner":{"login":"rmacor","id":8191057,"avatar_url":"https://avatars.githubusercontent.com/u/8191057?v=3","gravatar_id":"","url":"https://api.github.com/users/rmacor","html_url":"https://github.com/rmacor","followers_url":"https://api.github.com/users/rmacor/followers","following_url":"https://api.github.com/users/rmacor/following{/other_user}","gists_url":"https://api.github.com/users/rmacor/gists{/gist_id}","starred_url":"https://api.github.com/users/rmacor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmacor/subscriptions","organizations_url":"https://api.github.com/users/rmacor/orgs","repos_url":"https://api.github.com/users/rmacor/repos","events_url":"https://api.github.com/users/rmacor/events{/privacy}","received_events_url":"https://api.github.com/users/rmacor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmacor/radargun","description":"The RadarGun benchmarking framework for data grids and distributed caches","fork":true,"url":"https://api.github.com/repos/rmacor/radargun","forks_url":"https://api.github.com/repos/rmacor/radargun/forks","keys_url":"https://api.github.com/repos/rmacor/radargun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmacor/radargun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmacor/radargun/teams","hooks_url":"https://api.github.com/repos/rmacor/radargun/hooks","issue_events_url":"https://api.github.com/repos/rmacor/radargun/issues/events{/number}","events_url":"https://api.github.com/repos/rmacor/radargun/events","assignees_url":"https://api.github.com/repos/rmacor/radargun/assignees{/user}","branches_url":"https://api.github.com/repos/rmacor/radargun/branches{/branch}","tags_url":"https://api.github.com/repos/rmacor/radargun/tags","blobs_url":"https://api.github.com/repos/rmacor/radargun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmacor/radargun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmacor/radargun/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmacor/radargun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmacor/radargun/statuses/{sha}","languages_url":"https://api.github.com/repos/rmacor/radargun/languages","stargazers_url":"https://api.github.com/repos/rmacor/radargun/stargazers","contributors_url":"https://api.github.com/repos/rmacor/radargun/contributors","subscribers_url":"https://api.github.com/repos/rmacor/radargun/subscribers","subscription_url":"https://api.github.com/repos/rmacor/radargun/subscription","commits_url":"https://api.github.com/repos/rmacor/radargun/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmacor/radargun/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmacor/radargun/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmacor/radargun/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmacor/radargun/contents/{+path}","compare_url":"https://api.github.com/repos/rmacor/radargun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmacor/radargun/merges","archive_url":"https://api.github.com/repos/rmacor/radargun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmacor/radargun/downloads","issues_url":"https://api.github.com/repos/rmacor/radargun/issues{/number}","pulls_url":"https://api.github.com/repos/rmacor/radargun/pulls{/number}","milestones_url":"https://api.github.com/repos/rmacor/radargun/milestones{/number}","notifications_url":"https://api.github.com/repos/rmacor/radargun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmacor/radargun/labels{/name}","releases_url":"https://api.github.com/repos/rmacor/radargun/releases{/id}","created_at":"2015-07-30T08:09:35Z","updated_at":"2015-07-30T08:09:37Z","pushed_at":"2015-07-30T08:21:29Z","git_url":"git://github.com/rmacor/radargun.git","ssh_url":"git@github.com:rmacor/radargun.git","clone_url":"https://github.com/rmacor/radargun.git","svn_url":"https://github.com/rmacor/radargun","homepage":"http://radargun.github.com/radargun/","size":5107,"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":"radargun:master","ref":"master","sha":"38f37a158fff6a231af8de75c5323337d6faf774","user":{"login":"radargun","id":517796,"avatar_url":"https://avatars.githubusercontent.com/u/517796?v=3","gravatar_id":"","url":"https://api.github.com/users/radargun","html_url":"https://github.com/radargun","followers_url":"https://api.github.com/users/radargun/followers","following_url":"https://api.github.com/users/radargun/following{/other_user}","gists_url":"https://api.github.com/users/radargun/gists{/gist_id}","starred_url":"https://api.github.com/users/radargun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radargun/subscriptions","organizations_url":"https://api.github.com/users/radargun/orgs","repos_url":"https://api.github.com/users/radargun/repos","events_url":"https://api.github.com/users/radargun/events{/privacy}","received_events_url":"https://api.github.com/users/radargun/received_events","type":"Organization","site_admin":false},"repo":{"id":1156136,"name":"radargun","full_name":"radargun/radargun","owner":{"login":"radargun","id":517796,"avatar_url":"https://avatars.githubusercontent.com/u/517796?v=3","gravatar_id":"","url":"https://api.github.com/users/radargun","html_url":"https://github.com/radargun","followers_url":"https://api.github.com/users/radargun/followers","following_url":"https://api.github.com/users/radargun/following{/other_user}","gists_url":"https://api.github.com/users/radargun/gists{/gist_id}","starred_url":"https://api.github.com/users/radargun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radargun/subscriptions","organizations_url":"https://api.github.com/users/radargun/orgs","repos_url":"https://api.github.com/users/radargun/repos","events_url":"https://api.github.com/users/radargun/events{/privacy}","received_events_url":"https://api.github.com/users/radargun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/radargun/radargun","description":"The RadarGun benchmarking framework for data grids and distributed caches","fork":false,"url":"https://api.github.com/repos/radargun/radargun","forks_url":"https://api.github.com/repos/radargun/radargun/forks","keys_url":"https://api.github.com/repos/radargun/radargun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radargun/radargun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radargun/radargun/teams","hooks_url":"https://api.github.com/repos/radargun/radargun/hooks","issue_events_url":"https://api.github.com/repos/radargun/radargun/issues/events{/number}","events_url":"https://api.github.com/repos/radargun/radargun/events","assignees_url":"https://api.github.com/repos/radargun/radargun/assignees{/user}","branches_url":"https://api.github.com/repos/radargun/radargun/branches{/branch}","tags_url":"https://api.github.com/repos/radargun/radargun/tags","blobs_url":"https://api.github.com/repos/radargun/radargun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radargun/radargun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radargun/radargun/git/refs{/sha}","trees_url":"https://api.github.com/repos/radargun/radargun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radargun/radargun/statuses/{sha}","languages_url":"https://api.github.com/repos/radargun/radargun/languages","stargazers_url":"https://api.github.com/repos/radargun/radargun/stargazers","contributors_url":"https://api.github.com/repos/radargun/radargun/contributors","subscribers_url":"https://api.github.com/repos/radargun/radargun/subscribers","subscription_url":"https://api.github.com/repos/radargun/radargun/subscription","commits_url":"https://api.github.com/repos/radargun/radargun/commits{/sha}","git_commits_url":"https://api.github.com/repos/radargun/radargun/git/commits{/sha}","comments_url":"https://api.github.com/repos/radargun/radargun/comments{/number}","issue_comment_url":"https://api.github.com/repos/radargun/radargun/issues/comments{/number}","contents_url":"https://api.github.com/repos/radargun/radargun/contents/{+path}","compare_url":"https://api.github.com/repos/radargun/radargun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radargun/radargun/merges","archive_url":"https://api.github.com/repos/radargun/radargun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radargun/radargun/downloads","issues_url":"https://api.github.com/repos/radargun/radargun/issues{/number}","pulls_url":"https://api.github.com/repos/radargun/radargun/pulls{/number}","milestones_url":"https://api.github.com/repos/radargun/radargun/milestones{/number}","notifications_url":"https://api.github.com/repos/radargun/radargun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radargun/radargun/labels{/name}","releases_url":"https://api.github.com/repos/radargun/radargun/releases{/id}","created_at":"2010-12-10T13:35:42Z","updated_at":"2015-07-22T11:23:16Z","pushed_at":"2015-07-31T12:02:21Z","git_url":"git://github.com/radargun/radargun.git","ssh_url":"git@github.com:radargun/radargun.git","clone_url":"https://github.com/radargun/radargun.git","svn_url":"https://github.com/radargun/radargun","homepage":"http://radargun.github.com/radargun/","size":7561,"stargazers_count":62,"watchers_count":62,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":13,"forks":42,"open_issues":13,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radargun/radargun/pulls/248"},"html":{"href":"https://github.com/radargun/radargun/pull/248"},"issue":{"href":"https://api.github.com/repos/radargun/radargun/issues/248"},"comments":{"href":"https://api.github.com/repos/radargun/radargun/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/radargun/radargun/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/radargun/radargun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radargun/radargun/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/radargun/radargun/statuses/3fdf5382dc7e5d8e5cbfb1ac11d365b758a9847c"}}}}