aboutsummaryrefslogtreecommitdiff
path: root/src/com/google/caliper/TimedRunnable.java
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2009-12-15 18:54:02 -0800
committerJesse Wilson <jessewilson@google.com>2009-12-15 18:54:02 -0800
commit1440b36663f61ebde1952d91b4a1f4c1a27fcefa (patch)
tree35e2458d47b0de58bad416e002dc9f1e039ba9fd /src/com/google/caliper/TimedRunnable.java
parentda6e661c7e42d1358c2a49f0f02c7adc8e0a1671 (diff)
downloadcaliper-1440b36663f61ebde1952d91b4a1f4c1a27fcefa.tar.gz
Updating caliper to current SVN as of 20091215
A test A test/com A test/com/google A test/com/google/caliper A test/com/google/caliper/AllTests.java A test/com/google/caliper/examples A test/com/google/caliper/examples/ArraySortBenchmark.java A test/com/google/caliper/examples/BoxedDoubleToStringBenchmark.java A test/com/google/caliper/examples/ListIterationBenchmark.java A test/com/google/caliper/examples/IntModBenchmark.java A test/com/google/caliper/examples/CharacterBenchmark.java A test/com/google/caliper/examples/PrimitiveDoubleToStringBenchmark.java A test/com/google/caliper/examples/StringBuilderBenchmark.java A test/com/google/caliper/examples/EnumSetContainsBenchmark.java A test/com/google/caliper/examples/ExpensiveObjectsBenchmark.java A test/com/google/caliper/examples/FormatterBenchmark.java A lib A lib/junit.jar A lib/google-collect-1.0-rc4.jar A src A src/com A src/com/google A src/com/google/caliper A src/com/google/caliper/Caliper.java A src/com/google/caliper/Param.java A src/com/google/caliper/Parameter.java A src/com/google/caliper/ExecutionException.java A src/com/google/caliper/Run.java A src/com/google/caliper/SimpleBenchmark.java A src/com/google/caliper/ConfigurationException.java A src/com/google/caliper/Runner.java A src/com/google/caliper/TypeConverter.java A src/com/google/caliper/TimedRunnable.java A src/com/google/caliper/Benchmark.java A src/com/google/caliper/ConsoleReport.java A src/com/google/caliper/Result.java A caliper.ipr A core.iml A COPYING A build.xml Checked out revision 23.
Diffstat (limited to 'src/com/google/caliper/TimedRunnable.java')
-rw-r--r--src/com/google/caliper/TimedRunnable.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/com/google/caliper/TimedRunnable.java b/src/com/google/caliper/TimedRunnable.java
new file mode 100644
index 0000000..d1f9a6c
--- /dev/null
+++ b/src/com/google/caliper/TimedRunnable.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.caliper;
+
+public interface TimedRunnable {
+
+ /**
+ * Runs the benchmark through {@code trials} iterations.
+ *
+ * @return any object or null. Benchmark implementors may keep an accumulating
+ * value to prevent the runtime from optimizing away the code under test.
+ * Such an accumulator value can be returned here.
+ */
+ Object run(int reps) throws Exception;
+}