Search in sources :

Example 6 with Counter

use of io.dropwizard.metrics5.Counter in project algorithms-sedgewick-wayne by reneargento.

the class Exercise9 method main.

public static void main(String[] args) {
    int[] whitelist = { 2, 10, 3, 6, 5, 4, 7, 1, 9, 8 };
    int[] keys = { 10, 12, 5 };
    Counter counter = new Counter("Operations");
    Arrays.sort(whitelist);
    for (int i = 0; i < keys.length; i++) {
        if (rank(keys[i], whitelist, counter) == -1) {
            StdOut.println(keys[i]);
        }
    }
    StdOut.println(counter);
}
Also used : Counter(edu.princeton.cs.algs4.Counter)

Aggregations

Counter (edu.princeton.cs.algs4.Counter)5 Counter (io.dropwizard.metrics5.Counter)1 Histogram (io.dropwizard.metrics5.Histogram)1 Meter (io.dropwizard.metrics5.Meter)1 MetricName (io.dropwizard.metrics5.MetricName)1 Timer (io.dropwizard.metrics5.Timer)1 LabelKey (io.opencensus.metrics.LabelKey)1 LabelValue (io.opencensus.metrics.LabelValue)1 Metric (io.opencensus.metrics.export.Metric)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Test (org.junit.Test)1