lmdbjava / benchmarks

Benchmark of open source, embedded, memory-mapped, key-value stores available from Java (JMH)
Apache License 2.0
139 stars 20 forks source link

Error in running tests #8

Closed s-noghabi closed 7 years ago

s-noghabi commented 7 years ago

I am trying to run the benchmark, but I get the following error:

java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni64-0.0.1-SNAPSHOT in java.library.path, no leveldbjni-0.0.1-SNAPSHOT in java.library.path, no leveldbjni in java.library.path] at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:187) at org.fusesource.hawtjni.runtime.Library.load(Library.java:143) at org.fusesource.leveldbjni.JniDBFactory.(JniDBFactory.java:48) at org.lmdbjava.bench.LevelDb$CommonLevelDb.setup(LevelDb.java:147) at org.lmdbjava.bench.LevelDb$Reader.setup(LevelDb.java:200) at org.lmdbjava.bench.generated.LevelDb_readCrc_jmhTest._jmh_tryInit_f_reader1_G(LevelDb_readCrc_jmhTest.java:425) at org.lmdbjava.bench.generated.LevelDb_readCrc_jmhTest.readCrc_SampleTime(LevelDb_readCrc_jmhTest.java:238) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:430) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:412) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Can you help on how I can fix this?

Thanks!

benalexau commented 7 years ago

I'm unsure why you are seeing that message.

On a clean machine I just ran mvn clean package then quickly tested LevelDb via java -jar target/benchmarks.jar -f 1 -wi 0 -i 1 LevelDb:

# JMH 1.13 (released 255 days ago, please consider updating!)
# VM version: Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
JDK 1.8.0_121, VM 25.121-b13
# VM invoker: /usr/lib/jvm/java-8-openjdk/jre/bin/java
# VM options: -Dawt.useSystemAAFontSettings=gasp
# Warmup: <none>
# Measurement: 1 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Sampling time
# Benchmark: org.lmdbjava.bench.LevelDb.write
# Parameters: (batchSize = 1000000, intKey = true, num = 1000000, sequential = true, valRandom = false, valSize = 100)

# Run progress: 83.33% complete, ETA 00:00:04
# Fork: 1 of 1
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
Iteration   1: n = 1, mean = 1848 ms/op, p{0.00, 0.50, 0.90, 0.95, 0.99, 0.999, 0.9999, 1.00} = 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848 ms/op

# Run complete. Total time: 00:00:25

Benchmark          (batchSize)  (intKey)    (num)  (sequential)  (valRandom)  (valSize)    Mode  Cnt     Score   Error  Units
LevelDb.readCrc            N/A      true  1000000          true        false        100  sample       1293.943          ms/op
LevelDb.readKey            N/A      true  1000000          true        false        100  sample       2132.804          ms/op
LevelDb.readRev            N/A      true  1000000          true        false        100  sample       6400.508          ms/op
LevelDb.readSeq            N/A      true  1000000          true        false        100  sample       1231.028          ms/op
LevelDb.readXxh64          N/A      true  1000000          true        false        100  sample       1308.623          ms/op
LevelDb.write          1000000      true  1000000          true        false        100  sample       1847.591          ms/op

Are you using 64-bit Linux?

s-noghabi commented 7 years ago

I was using a Mac. I moved to Linux and it got fixed. Thanks!