GitHub PullRequestReviewCommentEvent at 2014-04-08 17:52:48
Repository: cassovary
Actor: pankajgupta
Payload: {"comment":{"url":"https://api.github.com/repos/twitter/cassovary/pulls/comments/11402433","id":11402433,"diff_hunk":"@@ -0,0 +1,68 @@\n+/*\n+ * Copyright 2014 Twitter, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n+ * file except in compliance with the License. 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, software distributed\n+ * under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the\n+ * specific language governing permissions and limitations under the License.\n+ */\n+package com.twitter.cassovary\n+\n+import com.twitter.cassovary.algorithms.{PageRankParams, PageRank}\n+import com.twitter.cassovary.graph.{DirectedGraph,GraphDir, GraphUtils, NodeUtils}\n+import com.twitter.cassovary.graph.GraphUtils.RandomWalkParams\n+import com.twitter.util.Duration\n+import com.twitter.util.Stopwatch\n+import scala.collection.JavaConversions._\n+import scala.util.Random\n+\n+trait GraphOperationBenchmark {\n+  def graph : DirectedGraph\n+  def operation(g : DirectedGraph)\n+\n+  def name : String\n+\n+  def run(repetitions : Int = 1) : Duration = {\n+    (1 to repetitions).map {\n+      _ =>\n+        val watch = Stopwatch.start()\n+        operation(graph)\n+        watch()\n+    }.reduce(_ + _) / repetitions\n+  }\n+}\n+\n+class PageRankBenchmark(val graph: DirectedGraph, pageRankParams : PageRankParams = PageRankParams())\n+    extends GraphOperationBenchmark {\n+  override def name = \"PageRank\"\n+\n+  override def operation(graph : DirectedGraph) {","path":"cassovary-benchmarks/src/main/scala/com/twitter/cassovary/GraphOperationBenchmark.scala","position":44,"original_position":44,"commit_id":"9ee89d72843bf9c57073c98abae4381aaad15659","original_commit_id":"9ee89d72843bf9c57073c98abae4381aaad15659","user":{"login":"pankajgupta","id":71128,"avatar_url":"https://avatars.githubusercontent.com/u/71128?","gravatar_id":"7a31f565e8d065a11c006ab0b6de3016","url":"https://api.github.com/users/pankajgupta","html_url":"https://github.com/pankajgupta","followers_url":"https://api.github.com/users/pankajgupta/followers","following_url":"https://api.github.com/users/pankajgupta/following{/other_user}","gists_url":"https://api.github.com/users/pankajgupta/gists{/gist_id}","starred_url":"https://api.github.com/users/pankajgupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pankajgupta/subscriptions","organizations_url":"https://api.github.com/users/pankajgupta/orgs","repos_url":"https://api.github.com/users/pankajgupta/repos","events_url":"https://api.github.com/users/pankajgupta/events{/privacy}","received_events_url":"https://api.github.com/users/pankajgupta/received_events","type":"User","site_admin":false},"body":"keyword \"override\" not needed for implementation of an abstract method","created_at":"2014-04-08T17:52:48Z","updated_at":"2014-04-08T17:52:48Z","html_url":"https://github.com/twitter/cassovary/pull/54#discussion_r11402433","pull_request_url":"https://api.github.com/repos/twitter/cassovary/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/comments/11402433"},"html":{"href":"https://github.com/twitter/cassovary/pull/54#discussion_r11402433"},"pull_request":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/54"}}}}