Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package eu.toolchain.perftests.jmh.generated;
  
  import java.util.List;
 
 @Generated("org.openjdk.jmh.generators.core.BenchmarkGenerator")
 public final class ManyListeners_tiny {
 
     boolean p000p001p002p003p004p005p006p007p008p009p010p011p012p013p014p015;
     boolean p016p017p018p019p020p021p022p023p024p025p026p027p028p029p030p031;
     boolean p032p033p034p035p036p037p038p039p040p041p042p043p044p045p046p047;
     boolean p048p049p050p051p052p053p054p055p056p057p058p059p060p061p062p063;
     boolean p064p065p066p067p068p069p070p071p072p073p074p075p076p077p078p079;
     boolean p080p081p082p083p084p085p086p087p088p089p090p091p092p093p094p095;
     boolean p096p097p098p099p100p101p102p103p104p105p106p107p108p109p110p111;
     boolean p112p113p114p115p116p117p118p119p120p121p122p123p124p125p126p127;
     boolean p128p129p130p131p132p133p134p135p136p137p138p139p140p141p142p143;
     boolean p144p145p146p147p148p149p150p151p152p153p154p155p156p157p158p159;
     boolean p160p161p162p163p164p165p166p167p168p169p170p171p172p173p174p175;
     boolean p176p177p178p179p180p181p182p183p184p185p186p187p188p189p190p191;
     boolean p192p193p194p195p196p197p198p199p200p201p202p203p204p205p206p207;
     boolean p208p209p210p211p212p213p214p215p216p217p218p219p220p221p222p223;
     boolean p224p225p226p227p228p229p230p231p232p233p234p235p236p237p238p239;
     boolean p240p241p242p243p244p245p246p247p248p249p250p251p252p253p254p255;
     int startRndMask;
 
     public BenchmarkTaskResult tiny_Throughput(InfraControl controlThreadParams threadParamsthrows Throwable {
         if (threadParams.getSubgroupIndex() == 0) {
             RawResults res = new RawResults();
             Blackhole_jmh l_blackhole1_1 = _jmh_tryInit_f_blackhole1_1(controlthreadParams);
             ManyListeners_jmh l_manylisteners0_0 = _jmh_tryInit_f_manylisteners0_0(controlthreadParams);
 
             control.preSetup();
             l_blackhole1_1.clearSinks();
 
             control.announceWarmupReady();
             while (control.warmupShouldWait) {
                 l_manylisteners0_0.tiny();
                 res.allOps++;
             }
 
             tiny_thrpt_jmhStub(controlresl_manylisteners0_0l_blackhole1_1);
             control.announceWarmdownReady();
             try {
                 while (control.warmdownShouldWait) {
                     l_manylisteners0_0.tiny();
                     res.allOps++;
                 }
                 control.preTearDown();
             } catch (InterruptedException ie) {
                 control.preTearDownForce();
             }
 
             if (control.isLastIteration()) {
                  = null;
                  = null;
             }
             res.allOps += res.measuredOps;
             int batchSize = control.iterationParams.getBatchSize();
             int opsPerInv = control.benchmarkParams.getOpsPerInvocation();
             res.allOps *= opsPerInv;
             res.allOps /= batchSize;
             res.measuredOps *= opsPerInv;
             res.measuredOps /= batchSize;
             BenchmarkTaskResult results = new BenchmarkTaskResult(res.allOpsres.measuredOps);
             results.add(new ThroughputResult(."tiny"res.measuredOpsres.getTime(), control.benchmarkParams.getTimeUnit()));
             return results;
         } else
             throw new IllegalStateException("Harness failed to distribute threads among groups properly");
     }
 
     public void tiny_thrpt_jmhStub(InfraControl controlRawResults resultManyListeners_jmh l_manylisteners0_0Blackhole_jmh l_blackhole1_1throws Throwable {
        long operations = 0;
        long realTime = 0;
        result.startTime = System.nanoTime();
        do {
            l_manylisteners0_0.tiny();
            operations++;
        } while(!control.isDone);
        result.stopTime = System.nanoTime();
        result.realTime = realTime;
        result.measuredOps = operations;
    }
    public BenchmarkTaskResult tiny_AverageTime(InfraControl controlThreadParams threadParamsthrows Throwable {
        if (threadParams.getSubgroupIndex() == 0) {
            RawResults res = new RawResults();
            Blackhole_jmh l_blackhole1_1 = _jmh_tryInit_f_blackhole1_1(controlthreadParams);
            ManyListeners_jmh l_manylisteners0_0 = _jmh_tryInit_f_manylisteners0_0(controlthreadParams);
            control.preSetup();
            l_blackhole1_1.clearSinks();
            control.announceWarmupReady();
            while (control.warmupShouldWait) {
                l_manylisteners0_0.tiny();
                res.allOps++;
            }
            tiny_avgt_jmhStub(controlresl_manylisteners0_0l_blackhole1_1);
            control.announceWarmdownReady();
            try {
                while (control.warmdownShouldWait) {
                    l_manylisteners0_0.tiny();
                    res.allOps++;
                }
                control.preTearDown();
            } catch (InterruptedException ie) {
                control.preTearDownForce();
            }
            if (control.isLastIteration()) {
                 = null;
                 = null;
            }
            res.allOps += res.measuredOps;
            int batchSize = control.iterationParams.getBatchSize();
            int opsPerInv = control.benchmarkParams.getOpsPerInvocation();
            res.allOps *= opsPerInv;
            res.allOps /= batchSize;
            res.measuredOps *= opsPerInv;
            res.measuredOps /= batchSize;
            BenchmarkTaskResult results = new BenchmarkTaskResult(res.allOpsres.measuredOps);
            results.add(new AverageTimeResult(."tiny"res.measuredOpsres.getTime(), control.benchmarkParams.getTimeUnit()));
            return results;
        } else
            throw new IllegalStateException("Harness failed to distribute threads among groups properly");
    }
    public void tiny_avgt_jmhStub(InfraControl controlRawResults resultManyListeners_jmh l_manylisteners0_0Blackhole_jmh l_blackhole1_1throws Throwable {
        long operations = 0;
        long realTime = 0;
        result.startTime = System.nanoTime();
        do {
            l_manylisteners0_0.tiny();
            operations++;
        } while(!control.isDone);
        result.stopTime = System.nanoTime();
        result.realTime = realTime;
        result.measuredOps = operations;
    }
    public BenchmarkTaskResult tiny_SampleTime(InfraControl controlThreadParams threadParamsthrows Throwable {
        if (threadParams.getSubgroupIndex() == 0) {
            RawResults res = new RawResults();
            Blackhole_jmh l_blackhole1_1 = _jmh_tryInit_f_blackhole1_1(controlthreadParams);
            ManyListeners_jmh l_manylisteners0_0 = _jmh_tryInit_f_manylisteners0_0(controlthreadParams);
            control.preSetup();
            l_blackhole1_1.clearSinks();
            control.announceWarmupReady();
            while (control.warmupShouldWait) {
                l_manylisteners0_0.tiny();
                res.allOps++;
            }
            int targetSamples = (int) (control.getDuration(.) * 20); // at max, 20 timestamps per millisecond
            int batchSize = control.iterationParams.getBatchSize();
            int opsPerInv = control.benchmarkParams.getOpsPerInvocation();
            SampleBuffer buffer = new SampleBuffer();
            tiny_sample_jmhStub(controlresbuffertargetSamplesopsPerInvbatchSizel_manylisteners0_0l_blackhole1_1);
            control.announceWarmdownReady();
            try {
                while (control.warmdownShouldWait) {
                    l_manylisteners0_0.tiny();
                    res.allOps++;
                }
                control.preTearDown();
            } catch (InterruptedException ie) {
                control.preTearDownForce();
            }
            if (control.isLastIteration()) {
                 = null;
                 = null;
            }
            res.allOps += res.measuredOps * batchSize;
            res.allOps *= opsPerInv;
            res.allOps /= batchSize;
            res.measuredOps *= opsPerInv;
            BenchmarkTaskResult results = new BenchmarkTaskResult(res.allOpsres.measuredOps);
            results.add(new SampleTimeResult(."tiny"buffercontrol.benchmarkParams.getTimeUnit()));
            return results;
        } else
            throw new IllegalStateException("Harness failed to distribute threads among groups properly");
    }
    public void tiny_sample_jmhStub(InfraControl controlRawResults resultSampleBuffer bufferint targetSampleslong opsPerInvint batchSizeManyListeners_jmh l_manylisteners0_0Blackhole_jmh l_blackhole1_1throws Throwable {
        long realTime = 0;
        long operations = 0;
        int rnd = (int)System.nanoTime();
        int rndMask = ;
        long time = 0;
        int currentStride = 0;
        do {
            rnd = (rnd * 1664525 + 1013904223);
            boolean sample = (rnd & rndMask) == 0;
            if (sample) {
                time = System.nanoTime();
            }
            for (int b = 0; b < batchSizeb++) {
                if (control.volatileSpoilerreturn;
                l_manylisteners0_0.tiny();
            }
            if (sample) {
                buffer.add((System.nanoTime() - time) / opsPerInv);
                if (currentStride++ > targetSamples) {
                    buffer.half();
                    currentStride = 0;
                    rndMask = (rndMask << 1) + 1;
                }
            }
            operations++;
        } while(!control.isDone);
         = Math.max(rndMask);
        result.realTime = realTime;
        result.measuredOps = operations;
    }
    public BenchmarkTaskResult tiny_SingleShotTime(InfraControl controlThreadParams threadParamsthrows Throwable {
        if (threadParams.getSubgroupIndex() == 0) {
            Blackhole_jmh l_blackhole1_1 = _jmh_tryInit_f_blackhole1_1(controlthreadParams);
            ManyListeners_jmh l_manylisteners0_0 = _jmh_tryInit_f_manylisteners0_0(controlthreadParams);
            control.preSetup();
            l_blackhole1_1.clearSinks();
            RawResults res = new RawResults();
            int batchSize = control.iterationParams.getBatchSize();
            tiny_ss_jmhStub(controlbatchSizeresl_manylisteners0_0l_blackhole1_1);
            control.preTearDown();
            if (control.isLastIteration()) {
                 = null;
                 = null;
            }
            int opsPerInv = control.benchmarkParams.getOpsPerInvocation();
            long totalOps = opsPerInv;
            BenchmarkTaskResult results = new BenchmarkTaskResult(totalOpstotalOps);
            results.add(new SingleShotResult(."tiny"res.getTime(), control.benchmarkParams.getTimeUnit()));
            return results;
        } else
            throw new IllegalStateException("Harness failed to distribute threads among groups properly");
    }
    public void tiny_ss_jmhStub(InfraControl controlint batchSizeRawResults resultManyListeners_jmh l_manylisteners0_0Blackhole_jmh l_blackhole1_1throws Throwable {
        long realTime = 0;
        result.startTime = System.nanoTime();
        for (int b = 0; b < batchSizeb++) {
            if (control.volatileSpoilerreturn;
            l_manylisteners0_0.tiny();
        }
        result.stopTime = System.nanoTime();
        result.realTime = realTime;
    }
    
    
    Blackhole_jmh _jmh_tryInit_f_blackhole1_1(InfraControl controlThreadParams threadParamsthrows Throwable {
        Blackhole_jmh val = ;
        if (val == null) {
            val = new Blackhole_jmh();
             = val;
        }
        return val;
    }
    
    
        ManyListeners_jmh val = ;
        if (val == null) {
            val = new ManyListeners_jmh();
             = val;
        }
        return val;
    }
New to GrepCode? Check out our FAQ X