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

raphw / byte-buddy / #642

20 Aug 2024 09:12AM CUT coverage: 85.383% (-0.006%) from 85.389%
#642

push

raphw
Delegate class reader to factories.

28757 of 33680 relevant lines covered (85.38%)

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.*;
19
import org.openjdk.jmh.runner.Runner;
20
import org.openjdk.jmh.runner.RunnerException;
21
import org.openjdk.jmh.runner.options.OptionsBuilder;
22

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

30
    /**
31
     * A wildcard for the identification of a benchmark by JMH.
32
     */
33
    private static final String WILDCARD = ".*";
34

35
    /**
36
     * This class is not supposed to be constructed.
37
     */
38
    private QuickRunner() {
×
39
        throw new UnsupportedOperationException();
×
40
    }
41

42
    /**
43
     * Executes the benchmark.
44
     *
45
     * @param args Unused arguments.
46
     * @throws RunnerException If the benchmark causes an exception.
47
     */
48
    public static void main(String[] args) throws RunnerException {
49
        new Runner(new OptionsBuilder()
×
50
                .include(WILDCARD + SuperClassInvocationBenchmark.class.getSimpleName() + WILDCARD)
×
51
                .include(WILDCARD + StubInvocationBenchmark.class.getSimpleName() + WILDCARD)
×
52
                .include(WILDCARD + ClassByImplementationBenchmark.class.getSimpleName() + WILDCARD)
×
53
                .include(WILDCARD + ClassByExtensionBenchmark.class.getSimpleName() + WILDCARD)
×
54
                .include(WILDCARD + TrivialClassCreationBenchmark.class.getSimpleName() + WILDCARD)
×
55
                .forks(0) // Should rather be 1 but there seems to be a bug in JMH.
×
56
                .build()).run();
×
57
    }
×
58
}
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

© 2025 Coveralls, Inc