Package com.google.caliper.runner

Examples of com.google.caliper.runner.InvalidBenchmarkException


    }

    @Override long invokeTimeMethod(long reps) throws Exception {
      int intReps = (int) reps;
      if (reps != intReps) {
        throw new InvalidBenchmarkException("%s.%s takes an int for reps, "
            + "but requires a greater number to fill the given timing interval (%s). "
            + "If this is expected (the benchmarked code is very fast), use a long parameter."
            + "Otherwise, check your benchmark for errors.",
                benchmark.getClass(), benchmarkMethod.getName(),
                    ShortDuration.of(options.timingIntervalNanos, NANOSECONDS));
View Full Code Here


    @Override
    public BenchmarkMethod createBenchmarkMethod(final BenchmarkClass benchmarkClass, final Method method) throws InvalidBenchmarkException {
        checkArgument(isBenchmarkMethod(method));
        if (Util.isStatic(method)) {
            throw new InvalidBenchmarkException(
                    "LatencyMeasure methods must not be static: " + method.getName());
        }

        final String methodName = method.getName();
        final String shortName = methodName.substring("latency".length());
View Full Code Here

TOP

Related Classes of com.google.caliper.runner.InvalidBenchmarkException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.