435
questions
1
vote
3
answers
90
views
Problems with Java Vector API to sum a list of doubles
I implemented three naive sum methods (in scala) which act on an Array[Double] (or double[])
inline def sum2 =
var sum: Double = 0.0
var i: Int = 0
inline val species = ...
-1
votes
0
answers
37
views
Jmh Netbeans Ant Modular Project setup
Following is my environment.
netbeans 22, jdk 22.0.2, jmh 1.37.
I have added jmh to the netbeans libraries and have added it to my modular ant project. Everything is workig fine, the project compiles ...
2
votes
1
answer
117
views
Run JMH in dry-run mode
I am working on fixing a bug in kotlinx.benchmark, which wraps JMH. Development is made much slower because the tests actually run the benchmarks, which for what I'm doing, is not important. I just ...
0
votes
0
answers
62
views
Is there an equivalent to @BeforeAll in JMH(Java Microbenchmark Harness), Level.Trial is not working
Hello and good morning from Germany!
Since my English isn’t very good, I can only offer you a ChatGPT translation of my question.
Here���s the issue: I’m using the JMH Tool to benchmark a SpringBoot ...
0
votes
0
answers
56
views
Java: (Micro) benchmark library imports using JMH?
I have the following code that I am benchmarking using JMH
package org.example;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh....
0
votes
0
answers
16
views
Excluding setup methods from profiler to measure memory more accurately
I'm currently trying to measure memory consumption in JMH using a custom profiler (the same problem arrise when using the gc profiler) like this:
class ViatraMemoryProfiler extends InternalProfiler{
...
0
votes
1
answer
162
views
How to output JMH benchmark result into a local json file?
I am using JMH for benchmark tests. I want to output test result into json file and visualize the result use JMH Visualizer. However I wasn't able to find the output file "V3Benchmark.json" ...
4
votes
1
answer
312
views
Why acquiring a locked lock is slower when using JDK21 compared to JDK11
While optimizing some locking stuff, I used a JMH benchmark to see how much does locking a locked ReentrantLock costs compared to just locking it once. I was surprised when I saw that jdk11 performed ...
0
votes
0
answers
48
views
What it the equivalent to @BeforeClass / @BeforeAll in JMH?
before I start, I wanted to apologize for my bad English.
This is my class:
package de.shd.kps.backend.customer.benchmark;
import java.util.concurrent.TimeUnit;
import org.junit.runner.RunWith;
...
2
votes
1
answer
81
views
How to benchmark assert statements?
The next version of my Design by Contract API uses the following syntax:
assert requireThat(name, value).size().isGreaterThan(3).elseThrowAssert();
The idea being that the validation only runs if ...
0
votes
0
answers
61
views
JMH microbenchmarking on java api which uses parallel execution via Completable Future
I need to measure performance of my build method using JMH tool. The build method basically creates multiple threads internally by Completable Future in order to achieve parallel execution for loading ...
0
votes
0
answers
55
views
How to go about implementing adaptive warmups in JMH (in Scala)
I'm currently getting started in integrating JMH into a Scala Project and would like to implement a way to do adaptive warmups. What do I mean by apative warmups? Instead of defining a fixed number of ...
0
votes
1
answer
71
views
jmh benchmark methods not run while setup method is
I am trying to run jmh benchmark in a grade project. ./gradlew :sub-project:jmh
I can see the setup method got executed twice from stdout. but the two @Benchmark methods don't seem to be executed. the ...
0
votes
0
answers
40
views
NoClassDefFound error when using java.sql classes in JMH test in sbt
If I create a minimal sbt project with a build.sbt that looks like
scalaVersion := "3.3.1"
enablePlugins(JmhPlugin)
with addSbtPlugin("pl.project14.scala" % "sbt-jmh" % ...
0
votes
0
answers
56
views
How to measure Big O time complexity for deletion method of a Treeset?
I want to use JMH to prove the time complexity of adding to/ deleting from a Treeset in a Java orderbook, it should be O(log n) for insertion and deletion.
For insertion it is independent, as N grows ...