Examples of Sampler


Examples of cloudtrace.instrument.Sampler

        log.warn(e, e);
        return;
      }
    }
   
    Sampler sampler = new CountSampler(100);
   
    while (true) {
      if (sampler.next())
        Trace.on("gc");
     
      Span gcSpan = Trace.start("loop");
      tStart = System.currentTimeMillis();
      try {
View Full Code Here

Examples of com.google.monitoring.runtime.instrumentation.Sampler

            return Long.valueOf(0L);
        }
    };

    public InstrumentedThreadAllocationTracer() {
        AllocationRecorder.addSampler(new Sampler() {
            @Override
            public void sampleAllocation(int count, String desc, Object newObject, long size) {
                allocationSize.set(allocationSize.get() + size);
            }
        });
View Full Code Here

Examples of org.apache.accumulo.cloudtrace.instrument.Sampler

        log.warn(e, e);
        return;
      }
    }
   
    Sampler sampler = new CountSampler(100);
   
    while (true) {
      if (sampler.next())
        Trace.on("gc");
     
      Span gcSpan = Trace.start("loop");
      tStart = System.currentTimeMillis();
      try {
View Full Code Here

Examples of org.apache.accumulo.trace.instrument.Sampler

        log.warn(e, e);
        return;
      }
    }
   
    Sampler sampler = new CountSampler(100);
   
    while (true) {
      if (sampler.next())
        Trace.on("gc");
     
      Span gcSpan = Trace.start("loop");
      tStart = System.currentTimeMillis();
      try {
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

                    "Sample1", "Sample2", "Sample3" };
            int counter = 0;
            controller.setRunningVersion(true);
            ifCont.setRunningVersion(true);
           
            Sampler sampler = null;
            while ((sampler = controller.next()) != null) {
                sampler.sample(null);
                assertEquals(order[counter], sampler.getName());
                counter++;
            }
            assertEquals(counter, 6);
        }
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

                    "Sample1", "Sample2", "Sample3" };
            int counter = 0;
            controller.setRunningVersion(true);
            ifCont.setRunningVersion(true);
           
            Sampler sampler = null;
            while ((sampler = controller.next()) != null) {
                sampler.sample(null);
                if (sampler.getName().equals("Sample3")) {
                    ifCont.setCondition("true==false");
                }
                assertEquals(order[counter], sampler.getName());
                counter++;
            }
            assertEquals(counter, 6);
        }
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

            int counter = 0;
            controller.setRunningVersion(true);
            ifCont.setRunningVersion(true);
            genericCont.setRunningVersion(true);

            Sampler sampler = null;
            while ((sampler = controller.next()) != null) {
                sampler.sample(null);
                if (sampler.getName().equals("Sample3")) {
                    ifCont.setCondition("true==false");
                }
                assertEquals(order[counter], sampler.getName());
                counter++;
            }
            assertEquals(counter, 6);
        }
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

            }
        }

        // Get next sample and its name
        private String nextName(GenericController c) {
            Sampler s = c.next();
            if (s == null) {
                return null;
            }
            return s.getName();
        }
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

            mod = new URLRewritingModifier();
            mod.setThreadContext(context);
        }

        public void testNonHTTPSampler() throws Exception {
            Sampler sampler = new NullSampler();
            response = new SampleResult();
            context.setCurrentSampler(sampler);
            context.setPreviousResult(response);
            mod.process();
        }
View Full Code Here

Examples of org.apache.jmeter.samplers.Sampler

     * Modifies an entry object to replace the value of any url parameter that
     * matches a defined mask.
     *
     */
    public void process() {
        Sampler sam = getThreadContext().getCurrentSampler();
        HTTPSamplerBase sampler = null;
        if (!(sam instanceof HTTPSamplerBase)) {
            return;
        } else {
            sampler = (HTTPSamplerBase) sam;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.