• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

raphw / byte-buddy / #801

27 Oct 2025 09:37AM UTC coverage: 84.715% (-0.4%) from 85.118%
#801

push

raphw
Fix imports.

29586 of 34924 relevant lines covered (84.72%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/runner/QuickRunner.java
1
/*
2
 * Copyright 2014 - Present Rafael Winterhalter
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package net.bytebuddy.benchmark.runner;
17

18
import net.bytebuddy.benchmark.ClassByExtensionBenchmark;
19
import net.bytebuddy.benchmark.ClassByImplementationBenchmark;
20
import net.bytebuddy.benchmark.StubInvocationBenchmark;
21
import net.bytebuddy.benchmark.SuperClassInvocationBenchmark;
22
import net.bytebuddy.benchmark.TrivialClassCreationBenchmark;
23
import org.openjdk.jmh.runner.Runner;
24
import org.openjdk.jmh.runner.RunnerException;
25
import org.openjdk.jmh.runner.options.OptionsBuilder;
26

27
/**
28
 * A runner for completing a benchmark with only one JMH fork. This benchmark completes rather quick and can give
29
 * a great first performance indication. A published benchmark should rather be backed by an execution with additional
30
 * forks.
31
 */
32
public class QuickRunner {
33

34
    /**
35
     * A wildcard for the identification of a benchmark by JMH.
36
     */
37
    private static final String WILDCARD = ".*";
38

39
    /**
40
     * This class is not supposed to be constructed.
41
     */
42
    private QuickRunner() {
×
43
        throw new UnsupportedOperationException();
×
44
    }
45

46
    /**
47
     * Executes the benchmark.
48
     *
49
     * @param args Unused arguments.
50
     * @throws RunnerException If the benchmark causes an exception.
51
     */
52
    public static void main(String[] args) throws RunnerException {
53
        new Runner(new OptionsBuilder()
×
54
                .include(WILDCARD + SuperClassInvocationBenchmark.class.getSimpleName() + WILDCARD)
×
55
                .include(WILDCARD + StubInvocationBenchmark.class.getSimpleName() + WILDCARD)
×
56
                .include(WILDCARD + ClassByImplementationBenchmark.class.getSimpleName() + WILDCARD)
×
57
                .include(WILDCARD + ClassByExtensionBenchmark.class.getSimpleName() + WILDCARD)
×
58
                .include(WILDCARD + TrivialClassCreationBenchmark.class.getSimpleName() + WILDCARD)
×
59
                .forks(0) // Should rather be 1 but there seems to be a bug in JMH.
×
60
                .build()).run();
×
61
    }
×
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc