GitHub PullRequestReviewCommentEvent at 2014-04-08 16:10:28
Repository: elasticsearch
Actor: aleph-zero
Payload: {"comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/11397350","id":11397350,"diff_hunk":"@@ -0,0 +1,253 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.elasticsearch.action.bench;\n+\n+import org.elasticsearch.common.io.stream.StreamInput;\n+import org.elasticsearch.common.io.stream.StreamOutput;\n+import org.elasticsearch.common.io.stream.Streamable;\n+import org.elasticsearch.common.xcontent.ToXContent;\n+import org.elasticsearch.common.xcontent.XContentBuilder;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.List;\n+\n+/**\n+ * The result of a benchmark competition. Maintains per-node results.\n+ */\n+public class CompetitionResult implements Streamable, ToXContent {\n+\n+    private String competitionName;\n+    private int concurrency;\n+    private int multiplier;\n+    private boolean verbose;\n+    private double[] percentiles = DEFAULT_PERCENTILES;\n+\n+    private List<CompetitionNodeResult> nodeResults = new ArrayList<CompetitionNodeResult>();\n+\n+    private CompetitionSummary competitionSummary;\n+    private CompetitionDetails competitionDetails;\n+\n+    private static double[] DEFAULT_PERCENTILES = { 10, 25, 50, 75, 90, 99 };","path":"src/main/java/org/elasticsearch/action/bench/CompetitionResult.java","position":49,"original_position":49,"commit_id":"20748f95f632ea988851e38952a297b0131161cc","original_commit_id":"20748f95f632ea988851e38952a297b0131161cc","user":{"login":"aleph-zero","id":452273,"avatar_url":"https://avatars.githubusercontent.com/u/452273?","gravatar_id":"6d1cdd7a4dee25f4338c05ddc917488a","url":"https://api.github.com/users/aleph-zero","html_url":"https://github.com/aleph-zero","followers_url":"https://api.github.com/users/aleph-zero/followers","following_url":"https://api.github.com/users/aleph-zero/following{/other_user}","gists_url":"https://api.github.com/users/aleph-zero/gists{/gist_id}","starred_url":"https://api.github.com/users/aleph-zero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleph-zero/subscriptions","organizations_url":"https://api.github.com/users/aleph-zero/orgs","repos_url":"https://api.github.com/users/aleph-zero/repos","events_url":"https://api.github.com/users/aleph-zero/events{/privacy}","received_events_url":"https://api.github.com/users/aleph-zero/received_events","type":"User","site_admin":false},"body":"There is a lot of stuff I'd like to make final, but I haven't been able to discern our convention around this from looking at the codebase. It seems like final is used inconsistently. If there is no objection, then I'll start defining thing final where possible, but I'd like to understand at least if there is some unspoken convention about it. In my own personal code, for instance, I prefer to use final on method parameters and immutable instance variables, but I have seen that less here (not talking about the case of anonymous classes of course).","created_at":"2014-04-08T16:10:28Z","updated_at":"2014-04-08T16:10:28Z","html_url":"https://github.com/elasticsearch/elasticsearch/pull/5406#discussion_r11397350","pull_request_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/5406","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/11397350"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/5406#discussion_r11397350"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/5406"}}}}