private void addCpu()

in geronimo-metrics-extensions/geronimo-metrics-sigar/src/main/java/org/apache/geronimo/microprofile/metrics/extension/sigar/SigarRegistrar.java [280:303]


    private void addCpu(final Collection<Definition> definitions,
                        final String base,
                        final ThrowingSupplier<Cpu> provider) {
        definitions.add(new Definition(
                base + "idle", "CPU Idle Time",
                "The idle time of the CPU, in [ms]", "ms",
                () -> provider.get().getIdle()));
        definitions.add(new Definition(
                base + "nice", "CPU Nice Priority Time",
                "The time of the CPU spent on nice priority, in [ms]", "ms",
                () -> provider.get().getNice()));
        definitions.add(new Definition(
                base + "sys", "CPU User Time",
                "The time of the CPU used by the system, in [ms]", "ms",
                () -> provider.get().getSys()));
        definitions.add(new Definition(
                base + "total", "CPU Total Time",
                "The total time of the CPU, in [ms]", "ms",
                () -> provider.get().getTotal()));
        definitions.add(new Definition(
                base + "wait", "CPU Wait Time",
                "The time the CPU had to wait for data to be loaded, in [ms]", "ms",
                () -> provider.get().getWait()));
    }