Examples of measure()


Examples of com.yahoo.ycsb.measurements.Measurements.measure()

            long st=System.nanoTime();
            if (_hTable != null) {
                _hTable.flushCommits();
            }
            long en=System.nanoTime();
            _measurements.measure("UPDATE", (int)((en-st)/1000));
        } catch (IOException e) {
            throw new DBException(e);
        }
    }
View Full Code Here

Examples of net.sf.collabreview.measurements.weight.ArtifactWeight.measure()

      Artifact artifact = repository.getLatestForName(artId.getName(), artId.getBranch());
      Float artifactQuality = collabReview.getMeasurementsManager().getArtifactQualityAssessor().assessQuality(artId);
      if (artifactQuality == null) {
        continue;
      }
      float myResponsibilityScore = weight.measure(artifact) * collabReview.getMeasurementsManager().getArtifactResponsibility().assessResponsibility(artifact, user);
      if (myResponsibilityScore != 0) {
        // DocumentLength * Participation * QualityRating
        float myQualityScore = myResponsibilityScore * artifactQuality;
        // checks if the current document score is worse than one of the five worst scores
        // if yes: score and document will be added to the according tables for worst rated documents
View Full Code Here

Examples of net.sf.collabreview.measurements.weight.ArtifactWeight.measure()

        // overall scores
        myOverallQualityScore += myQualityScore;
        myOverallResponsibilityScore += myResponsibilityScore;
      }
      // DocumentLength * Participation * QualityRating
      float qualityScore = weight.measure(artifact) * artifactQuality;
      if (qualityScore < allWorstScores[4]) {
        allWorstScores[4] = qualityScore;
        allWorstDocuments[4] = artifact;
        for (int j = 4; j > 0; j--) {
          if (allWorstScores[j] < allWorstScores[j - 1]) {
View Full Code Here

Examples of net.sf.jasperreports.engine.fill.JRTextMeasurer.measure()

        text,
        JRCommonText.MARKUP_STYLED_TEXT.equals(printText.getMarkup()),//FIXMEMARKUP only static styled text appears on preview. no other markup
        JRStyledTextAttributeSelector.getTextLocale(printText)
        );
   
    JRMeasuredText measuredText = textMeasurer.measure(
        styledText,
        0,
        0,
        false
        );
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Count.measure()

    public void testEventWindowing() {
        Count count = new Count();
        MetricConfig config = new MetricConfig().eventWindow(1).samples(2);
        count.record(config, 1.0, time.milliseconds());
        count.record(config, 1.0, time.milliseconds());
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
        count.record(config, 1.0, time.milliseconds()); // first event times out
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
    }

    @Test
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Count.measure()

        MetricConfig config = new MetricConfig().eventWindow(1).samples(2);
        count.record(config, 1.0, time.milliseconds());
        count.record(config, 1.0, time.milliseconds());
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
        count.record(config, 1.0, time.milliseconds()); // first event times out
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
    }

    @Test
    public void testTimeWindowing() {
        Count count = new Count();
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Count.measure()

        Count count = new Count();
        MetricConfig config = new MetricConfig().timeWindow(1, TimeUnit.MILLISECONDS).samples(2);
        count.record(config, 1.0, time.milliseconds());
        time.sleep(1);
        count.record(config, 1.0, time.milliseconds());
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
        time.sleep(1);
        count.record(config, 1.0, time.milliseconds()); // oldest event times out
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
    }
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Count.measure()

        time.sleep(1);
        count.record(config, 1.0, time.milliseconds());
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
        time.sleep(1);
        count.record(config, 1.0, time.milliseconds()); // oldest event times out
        assertEquals(2.0, count.measure(config, time.milliseconds()), EPS);
    }

    @Test
    public void testOldDataHasNoEffect() {
        Max max = new Max();
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Max.measure()

        long windowMs = 100;
        int samples = 2;
        MetricConfig config = new MetricConfig().timeWindow(windowMs, TimeUnit.MILLISECONDS).samples(samples);
        max.record(config, 50, time.milliseconds());
        time.sleep(samples * windowMs);
        assertEquals(Double.NEGATIVE_INFINITY, max.measure(config, time.milliseconds()), EPS);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testDuplicateMetricName() {
        metrics.sensor("test").add("test", new Avg());
View Full Code Here

Examples of org.github.jamm.MemoryMeter.measure()

            final MemoryMeter meter = new MemoryMeter();

            @Override
            public int weightOf(ColumnFamily value)
            {
                return (int) Math.min(meter.measure(value), Integer.MAX_VALUE);
            }
        };
    }
}
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.