public class TimeRecorder extends Object
| Modifier and Type | Field and Description |
|---|---|
private ArrayList<javax.json.JsonArray> |
arrays |
private long |
counterPT |
private long |
counterRT |
private ArrayList<io.micrometer.core.instrument.Counter> |
counters |
private long |
counterTT |
private long |
gaugePT |
private long |
gaugeRT |
private ArrayList<io.micrometer.core.instrument.Gauge> |
gauges |
private long |
gaugeTT |
private static int |
LOOP |
private javax.json.JsonObject |
meter |
private ArrayList<javax.json.JsonObject> |
objects |
private long |
parse |
private long |
retrieve |
private de.iip_ecosphere.platform.support.aas.Submodel |
sm |
private long |
start |
private String[] |
tags |
private long |
timerPT |
private long |
timerRT |
private ArrayList<io.micrometer.core.instrument.Timer> |
timers |
private long |
timerTT |
| Constructor and Description |
|---|
TimeRecorder() |
| Modifier and Type | Method and Description |
|---|---|
private void |
add()
Adds AAS property values to objects and arrays.
|
private void |
initialize()
Initializes the measurement.
|
static void |
main(String[] args)
Executes the TimeRecorder.
This class will connect to the AAS and retrieve all the metrics, recording the time required to both retrieve the data and parse it. |
private void |
measure()
Initializes and measures.
|
private void |
printResults()
Print out the results.
|
private static javax.json.JsonArray |
retrieveArray(Object json)
Creates a JSON Array from a retrieved String.
|
private static javax.json.JsonObject |
retrieveObject(Object json)
Creates a JSON Object from a retrieved String.
|
private static String[] |
retrieveTags(javax.json.JsonArray tagsArr)
Retrieves the Tags stored in a JsonArray as a String array needed for the
method.
|
private static final int LOOP
private de.iip_ecosphere.platform.support.aas.Submodel sm
private ArrayList<javax.json.JsonObject> objects
private ArrayList<javax.json.JsonArray> arrays
private ArrayList<io.micrometer.core.instrument.Counter> counters
private ArrayList<io.micrometer.core.instrument.Gauge> gauges
private ArrayList<io.micrometer.core.instrument.Timer> timers
private javax.json.JsonObject meter
private String[] tags
private long start
private long retrieve
private long parse
private long counterRT
private long counterPT
private long counterTT
private long gaugeRT
private long gaugePT
private long gaugeTT
private long timerRT
private long timerPT
private long timerTT
public static void main(String[] args) throws IOException, ExecutionException
LOOP
amount of times before printing the mean, ensuring that the data is more
accurate.args - command line arguments, never usedIOException - if it occurs when retrieving the registryExecutionException - if it occurs when retrieving the propertiesprivate void initialize()
throws IOException
IOException - if it occurs when retrieving the registryprivate void measure()
throws ExecutionException
ExecutionException - if it occurs when retrieving the propertiesprivate void printResults()
private void add()
throws ExecutionException
ExecutionException - if some submodel operation failsprivate static javax.json.JsonObject retrieveObject(Object json)
json - String representing the JSON Objectprivate static javax.json.JsonArray retrieveArray(Object json)
json - String representing the JSON Arrayprivate static String[] retrieveTags(javax.json.JsonArray tagsArr)
tagsArr - JsonArray with the tagsCopyright © 2022. All rights reserved.