Questions tagged [caliper]

Caliper is Google's open-source framework for writing, running and viewing the results of Java microbenchmarks.

See the Caliper project site, and online result viewer.

The simplest complete Caliper benchmark looks like this:

public class MyBenchmark extends SimpleBenchmark {
  public void timeMyOperation(int reps) {
    for (int i = 0; i < reps; i++) {
      MyClass.myOperation();
    }
  }
}

Very short tutorial examples.

More introductory examples.

83 questions
4
votes
1 answer

How do I run Guava's benchmark suite?

Guava has a guava-tests subdirectory that contains a directory subtree called benchmark. It appears that executing mvn test (or mvn install) runs the full suite of unit tests in the test subtree, but nothing is run in the benchmarks suite. My…
Byte Lab
  • 1,576
  • 2
  • 17
  • 42
4
votes
3 answers

Caliper benchmark fails due to JIT compilation

I got a Caliper benchmark which looks like this: public Course timeCourseCreation( int i ) { return createCourse( i ); } public Course createCourse( int t ) { Course course = new Course(); for ( int i = 0 + t; i < this.students + t; i++ )…
Thomas Uhrig
  • 30,811
  • 12
  • 60
  • 80
4
votes
2 answers

Cannot resolve com.google.caliper.BeforeExperiment

I git clone souce code from code.google.com when i set guava-tests module benchmark as maven source root ,but it's also error how to solve it? see the picture follow Frank advice I change to bechmark maked as a "Test Source Root" but the Idea…
fuyou001
  • 1,594
  • 4
  • 16
  • 27
4
votes
1 answer

Caliper: micro- and macro benchmarks

For ELKI I need (and have) more flexible sorting implementations than what is provided with the standard Java JDK and the Collections API. (Sorting is not my ultimate goal. I use partial sorting for bulk loading index structures such as the k-d-tree…
Erich Schubert
  • 8,575
  • 2
  • 26
  • 42
4
votes
2 answers

google Caliper example test doesn't work?

I downloaded the latest google caliper source code and build it using maven. Now I am trying to run google caliper example test given here.. I am using the below command to execute the test. java -cp…
Rakesh
  • 3,987
  • 10
  • 43
  • 68
3
votes
1 answer

Caliper : how to post online results?

I am currently trying to get my way around Caliper with the few documentation available on the google code project's wiki. Having managed to run a few benchmarks, I would now like to post the results online so that I can read them a little more…
Kellindil
  • 4,523
  • 21
  • 20
3
votes
1 answer

How to specify the command line when using Caliper?

I find Google's micro benchmark project Caliper very interesting but the documentation is still (except some examples) quite non-existent. I have two different cases where I need to influence the command line of the JVMs Caliper starts: I need to…
Javafanboy
  • 91
  • 6
3
votes
2 answers

Is it possible to use a micro-benchmark framework to only time some statements?

I am planning to micro benchmark my java code which involves several calls to local as well as remote database. I was about to use System.nanoTime() but started reading about the micro benchmarking frameworks such as jmh and caliper. Use of these…
Raghava
  • 947
  • 4
  • 15
  • 29
3
votes
2 answers

How to reference a local repository in maven?

I downloaded the source and built caliper like this: mvn eclipse:configure-workspace eclipse:eclipse install Now the /target folder has: caliper-1.0-beta-SNAPSHOT-all.jar generated-sources …
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
3
votes
2 answers

ByteBuffer.putLong ~2x faster with non-native ByteOrder

Here's a result I can't wrap by head around, despite extensive reading of the JDK source and the examination of intrinsic routines. I'm testing clearing out a ByteBuffer, allocated with allocateDirect using ByteBuffer.putLong(int index, long value).…
BeeOnRope
  • 60,350
  • 16
  • 207
  • 386
3
votes
1 answer

Console output in Caliper 1.0

In Caliper ~0.5, benchmark runs were accompanied by some human readable console output for each benchmark run, e.g.: stringCount benchmark ns linear runtime 2 Concat 73.3 = 2 StringBuilderSized …
BeeOnRope
  • 60,350
  • 16
  • 207
  • 386
3
votes
1 answer

Caliper: Interpreting the benchmark results

Can anyone help me with this question. I write simple benchmark with single method public void timeIntArrayBlockingQueue(int reps) { for (int i = 0; i < reps; i++) { for (int j = 0; j < length; j++) queue.add(data[j]); Integer…
2
votes
0 answers

NonConstantMemoryUsage Exception

I was doing tests with MeasureMemory turned on and was getting "NonConstantMemoryUsage" exception. I did not modify reps as suggested by error message. What am I missing? [caliper] allocating java/lang/String with size 32 bytes [caliper] allocating…
ndchandar
  • 41
  • 3
2
votes
2 answers

Simple Benchmark Testing with Vogar

I want to write simple benchmark software for android. I researched and found Caliper + Vogar. But there is no example about them. Is there anyone use it ? I need simple code to call Caliper Benchmarks from android Activity. Thanks for help.
ziya
  • 21
  • 3
2
votes
1 answer

Hyperledger Caliper transaction lifecycle error: proposed response error by peer 2 UNKNOWN: access denied channel [] creator org

I want to use Hyperledger Caliper to test my chaincode but encountered some problems. The hyperledger fabric network is start by the byfn.sh up command. I use the command npx caliper benchmark run --caliper-workspace . --caliper-benchconfig…
liuqi
  • 131
  • 1
  • 8