public final class JsonLogUtil extends Object
Constructor and Description |
---|
JsonLogUtil() |
Modifier and Type | Method and Description |
---|---|
static JsonCurve |
addLatencyCurve(JsonLog jsonLog,
String curveName,
String curveDescription,
boolean isTotalLatency)
A simple way to keep track of latency within a system or a pipeline
is to add time stamp or latency curves to the log.
|
public static JsonCurve addLatencyCurve(JsonLog jsonLog, String curveName, String curveDescription, boolean isTotalLatency)
The curve name should have a numeric suffix, like TIME_T8 etc. or such a suffix will be added.
The first curve of this pattern added will contain a timestamp (long values of milliseconds since Epoch) while later curves added will contain the latency (in milliseconds) since the previous curve was added.
Curve names may not be a consecutive sequence. TIME_T0 can be followed by TIME_T4 and so on.
jsonLog
- Log to add latency curve to. Non-null.curveName
- Name of curve to add. A numeric suffix is added if
the name doesn't contain one already.curveDescription
- Curve description, typically describing the
performed task responsible for the latency. May be null.isTotalLatency
- True to make a grand total of latency curves added
earlier, false to make it a regular latency curve.IllegalArgumentException
- If jsonLog or curveName is null.Copyright © 2024 Petroware AS - https://petroware.no