APISonar


org.onosproject.cpman.ControlLoadSnapshot.time

> org > onosproject > cpman > ControlLoadSnapshot > time
org APIs onosproject APIs cpman APIs ControlLoadSnapshot APIs time APIs

Example 1
public ObjectNode encode(ControlLoadSnapshot controlLoadSnapshot, CodecContext context) {
        return context.mapper().createObjectNode()
                .put(TIME, controlLoadSnapshot.time())
                .put(LATEST, controlLoadSnapshot.latest())
                .put(AVERAGE, controlLoadSnapshot.average());
    }
Example 2
private void printControlLoadSnapshot(ControlMetricType cmType, ControlLoadSnapshot cls) {
        if (cls != null) {
            print(FMT, cmType.toString(), cls.latest(), cls.average(), cls.time());
        } else {
            print("Failed to retrieve metric value for type {}", cmType.toString());
        }
    }