repo stringlengths 1 191 ⌀ | file stringlengths 23 351 | code stringlengths 0 5.32M | file_length int64 0 5.32M | avg_line_length float64 0 2.9k | max_line_length int64 0 288k | extension_type stringclasses 1 value |
|---|---|---|---|---|---|---|
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/BenchmarkBenchExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
@BenchmarkMode(Mode.All)
public class BenchmarkBenchExceptionSignaturesTest {
@Setup(Level.Trial)
public void setup1() throws Exception {}
@Setup(Level.Iteration)
public void setup2() throws Exception {}
@Setup(Level.Invocation)
public void setup3() throws Exception {}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {}
@Benchmark
public void test() throws Exception {}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,382 | 33.536232 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/BenchmarkStateExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class BenchmarkStateExceptionSignaturesTest {
@State(Scope.Benchmark)
public static class MyState {
@Setup(Level.Trial)
public void setup1() throws Exception {
}
@Setup(Level.Iteration)
public void setup2() throws Exception {
}
@Setup(Level.Invocation)
public void setup3() throws Exception {
}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {
}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {
}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {
}
}
@Benchmark
public void test(MyState s) throws Exception {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,543 | 31.202532 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/GroupBenchExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
@State(Scope.Group)
public class GroupBenchExceptionSignaturesTest {
@Setup(Level.Trial)
public void setup1() throws Exception {}
@Setup(Level.Iteration)
public void setup2() throws Exception {}
@Setup(Level.Invocation)
public void setup3() throws Exception {}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {}
@Benchmark
@Group("T")
public void test() throws Exception {}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,432 | 33.267606 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/GroupStateExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class GroupStateExceptionSignaturesTest {
@State(Scope.Group)
public static class MyState {
@Setup(Level.Trial)
public void setup1() throws Exception {
}
@Setup(Level.Iteration)
public void setup2() throws Exception {
}
@Setup(Level.Invocation)
public void setup3() throws Exception {
}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {
}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {
}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {
}
}
@Benchmark
@Group("T")
public void test(MyState s) throws Exception {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,593 | 31.024691 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/ThreadBenchExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
@State(Scope.Thread)
public class ThreadBenchExceptionSignaturesTest {
@Setup(Level.Trial)
public void setup1() throws Exception {}
@Setup(Level.Iteration)
public void setup2() throws Exception {}
@Setup(Level.Invocation)
public void setup3() throws Exception {}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {}
@Benchmark
public void test() throws Exception {}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,376 | 33.449275 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/exceptions/ThreadStateExceptionSignaturesTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.exceptions;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class ThreadStateExceptionSignaturesTest {
@State(Scope.Thread)
public static class MyState {
@Setup(Level.Trial)
public void setup1() throws Exception {
}
@Setup(Level.Iteration)
public void setup2() throws Exception {
}
@Setup(Level.Invocation)
public void setup3() throws Exception {
}
@TearDown(Level.Trial)
public void tearDown1() throws Exception {
}
@TearDown(Level.Iteration)
public void tearDown2() throws Exception {
}
@TearDown(Level.Invocation)
public void tearDown3() throws Exception {
}
}
@Benchmark
public void test(MyState s) throws Exception {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,537 | 31.126582 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/multsession/Benchmark1.java | /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.multsession;
import org.openjdk.jmh.annotations.Benchmark;
public class Benchmark1 {
@Benchmark
public void test() {}
}
| 1,372 | 38.228571 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/multsession/Benchmark2.java | /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.multsession;
import org.openjdk.jmh.annotations.Benchmark;
public class Benchmark2 {
@Benchmark
public void test() {}
}
| 1,372 | 38.228571 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/multsession/MultipleSessionsTest.java | /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.multsession;
import org.junit.Assert;
import org.junit.Test;
import org.openjdk.jmh.ct.InMemoryGeneratorDestination;
import org.openjdk.jmh.generators.core.BenchmarkGenerator;
import org.openjdk.jmh.generators.reflection.RFGeneratorSource;
import org.openjdk.jmh.runner.BenchmarkList;
public class MultipleSessionsTest {
@Test
public void testAppend() {
InMemoryGeneratorDestination dst = new InMemoryGeneratorDestination();
{
RFGeneratorSource src = new RFGeneratorSource();
BenchmarkGenerator gen = new BenchmarkGenerator();
src.processClasses(Benchmark1.class);
gen.generate(src, dst);
gen.complete(src, dst);
Assert.assertFalse("First stage error", dst.hasErrors());
Assert.assertFalse("First stage warnings", dst.hasWarnings());
Assert.assertFalse("First stage infos", dst.hasNotes());
String[] list = dst.getResources().get(BenchmarkList.BENCHMARK_LIST.substring(1)).split("\n");
Assert.assertEquals("First stage should have only 1 benchmark", 1, list.length);
}
{
RFGeneratorSource src = new RFGeneratorSource();
BenchmarkGenerator gen = new BenchmarkGenerator();
src.processClasses(Benchmark2.class);
gen.generate(src, dst);
gen.complete(src, dst);
Assert.assertFalse("Second stage error", dst.hasErrors());
Assert.assertFalse("Second stage warnings", dst.hasWarnings());
Assert.assertFalse("Second stage notes", dst.hasNotes());
String[] list = dst.getResources().get(BenchmarkList.BENCHMARK_LIST.substring(1)).split("\n");
Assert.assertEquals("Second stage should have 2 benchmarks", 2, list.length);
}
}
@Test
public void testOverwrite() {
InMemoryGeneratorDestination dst = new InMemoryGeneratorDestination();
{
RFGeneratorSource src = new RFGeneratorSource();
BenchmarkGenerator gen = new BenchmarkGenerator();
src.processClasses(Benchmark1.class);
gen.generate(src, dst);
gen.complete(src, dst);
Assert.assertFalse("First stage error", dst.hasErrors());
Assert.assertFalse("First stage warnings", dst.hasWarnings());
Assert.assertFalse("First stage notes", dst.hasNotes());
String[] list = dst.getResources().get(BenchmarkList.BENCHMARK_LIST.substring(1)).split("\n");
Assert.assertEquals("First stage should have only 1 benchmark", 1, list.length);
}
{
RFGeneratorSource src = new RFGeneratorSource();
BenchmarkGenerator gen = new BenchmarkGenerator();
src.processClasses(Benchmark1.class);
gen.generate(src, dst);
gen.complete(src, dst);
Assert.assertFalse("Second stage error", dst.hasErrors());
Assert.assertFalse("Second stage warnings", dst.hasWarnings());
Assert.assertTrue("Second stage notes", dst.hasNotes());
boolean hasOurInfo = false;
for (String warning : dst.getNotes()) {
hasOurInfo |= (warning.contains("Benchmark1") && warning.contains("overwriting"));
}
Assert.assertTrue("Should have our note: " + dst.getNotes(), hasOurInfo);
String[] list = dst.getResources().get(BenchmarkList.BENCHMARK_LIST.substring(1)).split("\n");
Assert.assertEquals("Second stage should have 1 benchmark", 1, list.length);
}
}
}
| 4,852 | 39.441667 | 106 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/BlackholeApiTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.ct.CompileTest;
import org.openjdk.jmh.infra.Blackhole;
/**
* Tests basic blackholing API.
*/
@BenchmarkMode(Mode.All)
public class BlackholeApiTest {
@Benchmark
public void testNothing() {
}
@Benchmark
public Object testReturnObject() {
return null;
}
@Benchmark
public int testReturnInt() {
return 0;
}
@Benchmark
public void testBH(Blackhole bh) {
}
@Benchmark
public Object testBH_ReturnObject(Blackhole bh) {
return null;
}
@Benchmark
public int testBH_ReturnInt(Blackhole bh) {
return 0;
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,139 | 27.918919 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/ControlTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
import org.openjdk.jmh.infra.Control;
public class ControlTest {
@State(Scope.Benchmark)
public static class BenchmarkState {
}
@State(Scope.Thread)
public static class ThreadState {
}
@State(Scope.Group)
public static class GroupState {
}
@Benchmark
@Group("plain")
public void plain_test1(Control cnt) {
}
@Benchmark
@Group("plain")
public void plain_test2(Control cnt) {
}
@Benchmark
@Group("plain")
public void plain_test3() {
}
@Benchmark
@Group("bench")
public void bench_test1(BenchmarkState s, Control cnt) {
}
@Benchmark
@Group("bench")
public void bench_test2(BenchmarkState s, Control cnt) {
}
@Benchmark
@Group("bench")
public void bench_test3(BenchmarkState s) {
}
@Benchmark
@Group("thread")
public void thread_test1(ThreadState s, Control cnt) {
}
@Benchmark
@Group("thread")
public void thread_test2(ThreadState s, Control cnt) {
}
@Benchmark
@Group("thread")
public void thread_test3(ThreadState s) {
}
@Benchmark
@Group("group")
public void group_test1(GroupState s, Control cnt) {
}
@Benchmark
@Group("group")
public void group_test2(GroupState s, Control cnt) {
}
@Benchmark
@Group("group")
public void group_test3(GroupState s) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,993 | 22.030769 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/GenericParamTest.java | /*
* Copyright (c) 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.ct.CompileTest;
public class GenericParamTest {
@Benchmark
public static <E> Object test(E param) {
return null;
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Method parameters should be either @State classes");
}
}
| 1,606 | 37.261905 | 101 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/GenericReturnTest.java | /*
* Copyright (c) 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.ct.CompileTest;
public class GenericReturnTest {
@Benchmark
public static <E> E test() {
return null;
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,540 | 35.690476 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/JmhNameTest.java | /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.ct.CompileTest;
public class JmhNameTest {
@Benchmark
public void jmh() {
// Intentionally left blank
}
@Benchmark
public void jmhNameTest() {
// Intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,655 | 32.795918 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/MeasureTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.ct.CompileTest;
import java.util.concurrent.TimeUnit;
@BenchmarkMode(Mode.All)
public class MeasureTest {
@Benchmark
@Measurement(iterations = 2)
public void test1() {
}
@Benchmark
@Measurement(time = 3)
public void test2() {
}
@Benchmark
@Measurement(timeUnit = TimeUnit.MICROSECONDS)
public void test3() {
}
@Benchmark
@Measurement(batchSize = 7)
public void test4() {
}
@Benchmark
@Measurement(iterations = 2, time = 3)
public void test5() {
}
@Benchmark
@Measurement(iterations = 2, time = 3, timeUnit = TimeUnit.MICROSECONDS)
public void test6() {
}
@Benchmark
@Measurement(iterations = 2, batchSize = 7)
public void test7() {
}
@Benchmark
@Measurement(iterations = 2, time = 3, timeUnit = TimeUnit.MICROSECONDS, batchSize = 7)
public void test8() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,481 | 25.688172 | 91 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/MultipleBenchmarkStateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class MultipleBenchmarkStateTest {
@State(Scope.Benchmark)
public static class G1 {}
@State(Scope.Benchmark)
public static class G2 {}
@State(Scope.Benchmark)
public static class G3 {}
@Benchmark
public void test1(G1 g1) {
}
@Benchmark
public void test2(G1 g1, G2 g2) {
}
@Benchmark
public void test3(G1 g1, G2 g2, G3 g3) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,058 | 29.279412 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/MultipleExecGroupStateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class MultipleExecGroupStateTest {
@State(Scope.Group)
public static class G1 {}
@State(Scope.Group)
public static class G2 {}
@State(Scope.Group)
public static class G3 {}
@Benchmark
@Group("group")
public void test1(G1 g1) {
}
@Benchmark
@Group("group")
public void test2(G1 g1, G2 g2) {
}
@Benchmark
@Group("group")
public void test3(G1 g1, G2 g2, G3 g3) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,148 | 28.847222 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/MultipleGroupStateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class MultipleGroupStateTest {
@State(Scope.Group)
public static class G1 {}
@State(Scope.Group)
public static class G2 {}
@State(Scope.Group)
public static class G3 {}
@Benchmark
@Group("T")
public void test1(G1 g1) {
}
@Benchmark
@Group("T")
public void test2(G1 g1, G2 g2) {
}
@Benchmark
@Group("T")
public void test3(G1 g1, G2 g2, G3 g3) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,132 | 28.625 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/MultipleThreadStateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class MultipleThreadStateTest {
@State(Scope.Thread)
public static class G1 {}
@State(Scope.Thread)
public static class G2 {}
@State(Scope.Thread)
public static class G3 {}
@Benchmark
public void test1(G1 g1) {
}
@Benchmark
public void test2(G1 g1, G2 g2) {
}
@Benchmark
public void test3(G1 g1, G2 g2, G3 g3) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,046 | 29.102941 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/OperationsPerInvocationTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OperationsPerInvocation;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class OperationsPerInvocationTest {
@Benchmark
@OperationsPerInvocation(1)
public void test1() {
}
@Benchmark
@OperationsPerInvocation(10)
public void test2() {
}
@Benchmark
@OperationsPerInvocation(Integer.MAX_VALUE)
public void test3() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,935 | 30.737705 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/SameBasenameStateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class SameBasenameStateTest {
public static class Enclosure1 {
@State(Scope.Thread)
public static class S {
}
}
public static class Enclosure2 {
@State(Scope.Thread)
public static class S {
}
}
@Benchmark
public void work(Enclosure1.S s1, Enclosure2.S s2) {
// this method was intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,940 | 31.35 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/StrictFPClassTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public strictfp class StrictFPClassTest {
@Benchmark
public void test() {
// intentionally blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,692 | 35.021277 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/StrictFPMethodTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.ct.CompileTest;
@BenchmarkMode(Mode.All)
public class StrictFPMethodTest {
@Benchmark
public strictfp void test() {
// intentionally blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,693 | 35.042553 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/SwingTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.ct.CompileTest;
import javax.swing.*;
public class SwingTest {
public static class S extends JFrame {
}
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,603 | 31.08 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/WarmupTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.ct.CompileTest;
import java.util.concurrent.TimeUnit;
@BenchmarkMode(Mode.All)
public class WarmupTest {
@Benchmark
@Warmup(iterations = 2)
public void test1() {
}
@Benchmark
@Warmup(time = 3)
public void test2() {
}
@Benchmark
@Warmup(timeUnit = TimeUnit.MICROSECONDS)
public void test3() {
}
@Benchmark
@Warmup(batchSize = 7)
public void test4() {
}
@Benchmark
@Warmup(iterations = 2, time = 3)
public void test5() {
}
@Benchmark
@Warmup(iterations = 2, time = 3, timeUnit = TimeUnit.MICROSECONDS)
public void test6() {
}
@Benchmark
@Warmup(iterations = 2, batchSize = 7)
public void test7() {
}
@Benchmark
@Warmup(iterations = 2, time = 3, timeUnit = TimeUnit.MICROSECONDS, batchSize = 7)
public void test8() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,435 | 25.193548 | 86 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/package-info.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This is a sample package-info to test JMH treats these properly.
*/
package org.openjdk.jmh.ct.other;
| 1,323 | 44.655172 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/AuxCountersTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Group;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class AuxCountersTest {
@State(Scope.Benchmark)
public static class BenchmarkState {
public int x;
}
@State(Scope.Group)
public static class GroupState {
public int y;
}
@AuxCounters
@State(Scope.Thread)
public static class ThreadState {
public int z;
}
@Benchmark
public void testThread(ThreadState s) {
}
@Benchmark
@Group("test_gt")
public void testGroupThread_1(GroupState gs, ThreadState ts) {
}
@Benchmark
@Group("test_gt")
public void testGroupThread_2(GroupState gs, ThreadState ts) {
}
@Benchmark
public void testBenchThread(BenchmarkState bs, ThreadState ts) {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,330 | 27.777778 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/HelperConflictTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters;
import org.junit.Test;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.ct.CompileTest;
public class HelperConflictTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
@Setup(Level.Trial)
public void setupTrial() {}
@Setup(Level.Iteration)
public void setupIteration() {}
@Setup(Level.Invocation)
public void setupInvocation() {}
@TearDown(Level.Invocation)
public void tearDownInvocation() {}
@TearDown(Level.Iteration)
public void tearDownIteration() {}
@TearDown(Level.Trial)
public void tearDownTrial() {}
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,082 | 30.560606 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/BooleanTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class BooleanTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
boolean cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,820 | 33.358491 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
byte cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,814 | 33.245283 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/CharTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class CharTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
char cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,814 | 33.245283 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
double cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,818 | 33.320755 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
float cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,816 | 33.283019 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
int cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,812 | 33.207547 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
long cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,814 | 33.245283 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
short cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,816 | 33.283019 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateFields/StringTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class StringTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
String cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,818 | 33.320755 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/BooleanTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class BooleanTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
boolean cnt() { return false; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,840 | 33.735849 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
byte cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,830 | 33.54717 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/CharTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class CharTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
char cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,830 | 33.54717 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
double cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,834 | 33.622642 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
float cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,832 | 33.584906 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
int cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,828 | 33.509434 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
long cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,830 | 33.54717 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
short cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,832 | 33.584906 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/StringTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class StringTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
String cnt() { return ""; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,835 | 33.641509 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/privateMethods/VoidTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.privateMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class VoidTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
void cnt() { }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,820 | 33.358491 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/BooleanTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class BooleanTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public boolean cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
}
}
| 1,865 | 34.207547 | 85 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public byte cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,820 | 33.358491 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/CharTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class CharTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public char cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
}
}
| 1,859 | 34.09434 | 85 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public double cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,824 | 33.433962 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public float cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,822 | 33.396226 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public int cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,818 | 33.320755 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public long cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,820 | 33.358491 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public short cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,822 | 33.396226 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicFields/StringTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicFields;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class StringTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public String cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the public field");
}
}
| 1,863 | 34.169811 | 85 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/BooleanTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class BooleanTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public boolean cnt() { return false; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
}
}
| 1,901 | 34.886792 | 101 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public byte cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,836 | 33.660377 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/CharTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class CharTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public char cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
}
}
| 1,891 | 34.698113 | 101 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public double cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,840 | 33.735849 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public float cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,838 | 33.698113 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public int cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,834 | 33.622642 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public long cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,836 | 33.660377 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public short cnt() { return 0; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,838 | 33.698113 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/StringTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class StringTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public String cnt() { return ""; }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "Illegal type for the return type of public method");
}
}
| 1,896 | 34.792453 | 101 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/counterTypes/publicMethods/VoidTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.counterTypes.publicMethods;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class VoidTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
public void cnt() { }
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,849 | 33.90566 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/BenchmarkStateTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.scope;
import org.junit.Test;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.ct.CompileTest;
public class BenchmarkStateTest {
@AuxCounters
@State(Scope.Benchmark)
public static class S {
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "can only be used with Scope.Thread states");
}
}
| 1,696 | 32.94 | 93 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/GroupStateTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.scope;
import org.junit.Test;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.ct.CompileTest;
public class GroupStateTest {
@AuxCounters
@State(Scope.Group)
public static class S {
}
@Benchmark
@Group("T")
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "can only be used with Scope.Thread states");
}
}
| 1,704 | 32.431373 | 93 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/scope/ThreadStateTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.scope;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ThreadStateTest {
@AuxCounters
@State(Scope.Thread)
public static class S {
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,783 | 32.660377 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public byte cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,832 | 33.584906 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public double cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,836 | 33.660377 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public float cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,834 | 33.622642 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public int cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,830 | 33.54717 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public long cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,832 | 33.584906 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/events/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.events;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters(AuxCounters.Type.EVENTS)
@State(Scope.Thread)
public static class S {
public short cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,834 | 33.622642 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ByteTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ByteTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public byte cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,840 | 33.735849 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/DoubleTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class DoubleTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public double cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,844 | 33.811321 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/FloatTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class FloatTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public float cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,842 | 33.773585 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/IntTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class IntTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public int cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,838 | 33.698113 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/LongTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class LongTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public long cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,840 | 33.735849 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/other/auxcounters/types/operations/ShortTest.java | /*
* Copyright (c) 2016, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.other.auxcounters.types.operations;
import org.junit.Test;
import org.openjdk.jmh.annotations.AuxCounters;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
public class ShortTest {
@AuxCounters(AuxCounters.Type.OPERATIONS)
@State(Scope.Thread)
public static class S {
public short cnt;
}
@Benchmark
public void benchmark(S s) {
// intentionally left blank
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,842 | 33.773585 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamAccessDefaultTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamAccessDefaultTest {
@Param("true")
boolean param_boolean;
@Param("0")
byte param_byte;
@Param("0")
short param_short;
@Param("0")
char param_char;
@Param("0")
int param_int;
@Param("0")
float param_float;
@Param("0")
long param_long;
@Param("0")
double param_double;
@Param("true")
Boolean param_Boolean;
@Param("0")
Byte param_Byte;
@Param("0")
Short param_Short;
@Param("0")
Character param_Char;
@Param("0")
Integer param_Int;
@Param("0")
Float param_Float;
@Param("0")
Long param_Long;
@Param("0")
Double param_Double;
@Param("null")
String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,385 | 23.10101 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamAccessPrivateTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamAccessPrivateTest {
@Param("true")
private boolean param_boolean;
@Param("0")
private byte param_byte;
@Param("0")
private short param_short;
@Param("0")
private char param_char;
@Param("0")
private int param_int;
@Param("0")
private float param_float;
@Param("0")
private long param_long;
@Param("0")
private double param_double;
@Param("true")
private Boolean param_Boolean;
@Param("0")
private Byte param_Byte;
@Param("0")
private Short param_Short;
@Param("0")
private Character param_Char;
@Param("0")
private Integer param_Int;
@Param("0")
private Float param_Float;
@Param("0")
private Long param_Long;
@Param("0")
private Double param_Double;
@Param("null")
private String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,521 | 24.474747 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamAccessProtectedTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamAccessProtectedTest {
@Param("true")
protected boolean param_boolean;
@Param("0")
protected byte param_byte;
@Param("0")
protected short param_short;
@Param("0")
protected char param_char;
@Param("0")
protected int param_int;
@Param("0")
protected float param_float;
@Param("0")
protected long param_long;
@Param("0")
protected double param_double;
@Param("true")
protected Boolean param_Boolean;
@Param("0")
protected Byte param_Byte;
@Param("0")
protected Short param_Short;
@Param("0")
protected Character param_Char;
@Param("0")
protected Integer param_Int;
@Param("0")
protected Float param_Float;
@Param("0")
protected Long param_Long;
@Param("0")
protected Double param_Double;
@Param("null")
protected String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,557 | 24.838384 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamAccessPublicTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamAccessPublicTest {
@Param("true")
public boolean param_boolean;
@Param("0")
public byte param_byte;
@Param("0")
public short param_short;
@Param("0")
public char param_char;
@Param("0")
public int param_int;
@Param("0")
public float param_float;
@Param("0")
public long param_long;
@Param("0")
public double param_double;
@Param("true")
public Boolean param_Boolean;
@Param("0")
public Byte param_Byte;
@Param("0")
public Short param_Short;
@Param("0")
public Character param_Char;
@Param("0")
public Integer param_Int;
@Param("0")
public Float param_Float;
@Param("0")
public Long param_Long;
@Param("0")
public Double param_Double;
@Param("null")
public String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,503 | 24.292929 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamBlankTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamBlankTest {
@Param
public boolean param_boolean;
@Param
public byte param_byte;
@Param
public short param_short;
@Param
public char param_char;
@Param
public int param_int;
@Param
public float param_float;
@Param
public long param_long;
@Param
public double param_double;
@Param
public Boolean param_Boolean;
@Param
public Byte param_Byte;
@Param
public Short param_Short;
@Param
public Character param_Char;
@Param
public Integer param_Int;
@Param
public Float param_Float;
@Param
public Long param_Long;
@Param
public Double param_Double;
@Param
public String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "default parameters");
}
}
| 2,426 | 23.515152 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamEscapesTest.java | /*
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamEscapesTest {
@Param("value")
public String param_plain;
@Param("value\n")
public String param_n;
@Param("value\r")
public String param_r;
@Param("value\r\n")
public String param_rn;
@Param("value\n\r")
public String param_nr;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,923 | 29.539683 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamOverridingTest.java | /*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamOverridingTest {
@Param("value")
private String param;
@Benchmark
public void test1() {}
public static class OverridingTest extends ParamOverridingTest {
@Param("newvalue")
private String param;
@Benchmark
public void test2() {}
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,916 | 32.631579 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamQuotesTest.java | /*
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamQuotesTest {
@Param("value")
public String param_plain;
@Param("[value]")
public String param_square;
@Param("{value}")
public String param_curly;
@Param("'value'")
public String param_squote;
@Param("\"value\"")
public String param_dquote;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 1,937 | 29.761905 | 76 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/ParamValuedTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ParamValuedTest {
@Param("true")
public boolean param_boolean;
@Param("0")
public byte param_byte;
@Param("0")
public short param_short;
@Param("0")
public char param_char;
@Param("0")
public int param_int;
@Param("0")
public float param_float;
@Param("0")
public long param_long;
@Param("0")
public double param_double;
@Param("true")
public Boolean param_Boolean;
@Param("0")
public Byte param_Byte;
@Param("0")
public Short param_Short;
@Param("0")
public Character param_Char;
@Param("0")
public Integer param_Int;
@Param("0")
public Float param_Float;
@Param("0")
public Long param_Long;
@Param("0")
public Double param_Double;
@Param("null")
public String param_String;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertOK(this.getClass());
}
}
| 2,497 | 24.232323 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/SampleEnum.java | /*
* Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params;
public enum SampleEnum {
VALUE_EXIST_1,
VALUE_EXIST_2,
}
| 1,314 | 41.419355 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/BooleanArrayTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class BooleanArrayTest {
@Param("0")
public boolean[] param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "annotation-compatible types");
}
}
| 1,773 | 33.784314 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/BooleanTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class BooleanTest {
@Param("foo")
public boolean param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass());
}
}
| 1,737 | 33.078431 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/Byte1Test.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class Byte1Test {
@Param("foo")
public byte param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass());
}
}
| 1,732 | 32.980392 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/Byte2Test.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class Byte2Test {
@Param("0.0")
public byte param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass());
}
}
| 1,732 | 32.980392 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/Byte3Test.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class Byte3Test {
@Param("4242")
public byte param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass());
}
}
| 1,733 | 33 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/ByteArrayTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class ByteArrayTest {
@Param("0")
public byte[] param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "annotation-compatible types");
}
}
| 1,767 | 33.666667 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/CharArrayTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class CharArrayTest {
@Param("0")
public char[] param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "annotation-compatible types");
}
}
| 1,767 | 33.666667 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/CharTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class CharTest {
@Param("foo")
public char param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass());
}
}
| 1,731 | 32.960784 | 79 | java |
jmh | jmh-master/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/params/invalid/DoubleArrayTest.java | /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.jmh.ct.params.invalid;
import org.junit.Test;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.ct.CompileTest;
@State(Scope.Benchmark)
public class DoubleArrayTest {
@Param("0")
public double[] param;
@Benchmark
public void test() {
}
@Test
public void compileTest() {
CompileTest.assertFail(this.getClass(), "annotation-compatible types");
}
}
| 1,771 | 33.745098 | 79 | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.