org.openjdk.jmh.annotations.Mode#SingleShotTime ( )源码实例Demo

下面列出了org.openjdk.jmh.annotations.Mode#SingleShotTime ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: parquet-mr   文件: ReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsDefaultBlockAndPageSizeSNAPPY(Blackhole blackhole)
        throws IOException
{
  read(file_1M_SNAPPY, ONE_MILLION, blackhole);
}
 
源代码2 项目: headlong   文件: MeasurePadding.java
@Benchmark
@Fork(value = 1, warmups = 1)
@BenchmarkMode(Mode.SingleShotTime)
@Warmup(iterations = 1)
@Measurement(iterations = 2)
public void cached() {
    insertPadding(paddingLen, negativeOnes, bb);
}
 
源代码3 项目: headlong   文件: MeasurePadding.java
@Benchmark
@Fork(value = 1, warmups = 1)
@BenchmarkMode(Mode.SingleShotTime)
@Warmup(iterations = 1)
@Measurement(iterations = 2)
public void uncached() {
    putN(negativeOnes ? (byte) -1 : (byte) 0, paddingLen, bb);
}
 
源代码4 项目: parquet-mr   文件: ReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsBS256MPS4MUncompressed(Blackhole blackhole)
        throws IOException
{
  read(file_1M_BS256M_PS4M, ONE_MILLION, blackhole);
}
 
源代码5 项目: parquet-mr   文件: ReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsBS512MPS4MUncompressed(Blackhole blackhole)
        throws IOException
{
  read(file_1M_BS512M_PS4M, ONE_MILLION, blackhole);
}
 
源代码6 项目: requery   文件: BenchmarkTest.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void queryJdbc() throws SQLException {
    try (Connection connection = dataSource.getConnection();
         PreparedStatement statement = connection.prepareStatement(
                 "SELECT id , name , email , birthday," +
                         " age, homepage, uuid FROM Person LIMIT 10000 ")) {

        try (ResultSet resultSet = statement.executeQuery()) {
            while (resultSet.next()) {
                resultSet.getLong(1); //id
                String name = resultSet.getString(2);
                String email = resultSet.getString(3);
                Date birthday = resultSet.getDate(4);
                Integer age = resultSet.getInt(5);
                String home = resultSet.getString(6);
                byte[] uuid = resultSet.getBytes(7);

                Person p = new Person();
                p.setName(name);
                p.setEmail(email);
                p.setUUID(uuid == null ? null : UUID.nameUUIDFromBytes(uuid));
                p.setBirthday(birthday);
                p.setHomepage(home == null ? null : new URL(home));
                p.setAge(age);
            }
        }
    } catch (MalformedURLException e) {
        throw new RuntimeException();
    }
}
 
源代码7 项目: parquet-mr   文件: PageChecksumWriteBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void write10MRowsSnappyWithChecksums() throws IOException {
  pageChecksumDataGenerator.generateData(file_10M_CHECKSUMS_SNAPPY, 10 * ONE_MILLION, true, SNAPPY);
}
 
@Benchmark
@BenchmarkMode({Mode.Throughput, Mode.AverageTime, Mode.SampleTime, Mode.SingleShotTime})
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public void measureMultiple() throws InterruptedException {
    TimeUnit.MILLISECONDS.sleep(100);
}
 
源代码9 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsUncompressedWithVerification(Blackhole blackhole) throws IOException {
  readFile(file_1M_CHECKSUMS_UNCOMPRESSED, ONE_MILLION, true, blackhole);
}
 
源代码10 项目: parquet-mr   文件: PageChecksumWriteBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void write10MRowsUncompressedWithChecksums() throws IOException {
  pageChecksumDataGenerator.generateData(file_10M_CHECKSUMS_UNCOMPRESSED, 10 * ONE_MILLION, true, UNCOMPRESSED);
}
 
源代码11 项目: parquet-mr   文件: PageChecksumWriteBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void write10MRowsGzipWithoutChecksums() throws IOException {
  pageChecksumDataGenerator.generateData(file_10M_NOCHECKSUMS_GZIP, 10 * ONE_MILLION, false, GZIP);
}
 
源代码12 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsGzipWithVerification(Blackhole blackhole) throws IOException {
  readFile(file_1M_CHECKSUMS_GZIP, ONE_MILLION, true, blackhole);
}
 
源代码13 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsGzipWithoutVerification(Blackhole blackhole) throws IOException {
  readFile(file_1M_CHECKSUMS_GZIP, ONE_MILLION, false, blackhole);
}
 
源代码14 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read10MRowsSnappyWithVerification(Blackhole blackhole) throws IOException {
  readFile(file_10M_CHECKSUMS_SNAPPY, 10 * ONE_MILLION, true, blackhole);
}
 
源代码15 项目: parquet-mr   文件: PageChecksumWriteBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void write1MRowsUncompressedWithChecksums() throws IOException {
  pageChecksumDataGenerator.generateData(file_1M_CHECKSUMS_UNCOMPRESSED, ONE_MILLION, true, UNCOMPRESSED);
}
 
源代码16 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read10MRowsUncompressedWithoutVerification(Blackhole blackhole) throws IOException {
  readFile(file_10M_CHECKSUMS_UNCOMPRESSED, 10 * ONE_MILLION, false, blackhole);
}
 
源代码17 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read10MRowsUncompressedWithVerification(Blackhole blackhole) throws IOException {
  readFile(file_10M_CHECKSUMS_UNCOMPRESSED, 10 * ONE_MILLION, true, blackhole);
}
 
源代码18 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read100KRowsSnappyWithoutVerification(Blackhole blackhole) throws IOException {
  readFile(file_100K_CHECKSUMS_SNAPPY, 100 * ONE_K, false, blackhole);
}
 
源代码19 项目: parquet-mr   文件: PageChecksumWriteBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void write10MRowsGzipWithChecksums() throws IOException {
  pageChecksumDataGenerator.generateData(file_10M_CHECKSUMS_GZIP, 10 * ONE_MILLION, true, GZIP);
}
 
源代码20 项目: parquet-mr   文件: PageChecksumReadBenchmarks.java
@Benchmark
@BenchmarkMode(Mode.SingleShotTime)
public void read1MRowsSnappyWithoutVerification(Blackhole blackhole) throws IOException {
  readFile(file_1M_CHECKSUMS_SNAPPY, ONE_MILLION, false, blackhole);
}