Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
void com.griddynamics.jagger.engine.e1.services.DefaultMetricService.createMetric ( MetricDescription  metricDescription)

Creates metric.

Author
Gribov Kirill
Details:

Registers in Jagger a metric define by metricDescription. Registration (creation) should be provided single time.
After metric is created you can save some test data to it with help of saveValue

Parameters
metricDescription- describes how to store metric

Implements com.griddynamics.jagger.engine.e1.services.MetricService.

Definition at line 46 of file DefaultMetricService.java.

References com.griddynamics.jagger.engine.e1.services.DefaultMetricService.context, com.griddynamics.jagger.engine.e1.collector.MetricDescription.getMetricId(), com.griddynamics.jagger.engine.e1.services.DefaultMetricService.sessionId, and com.griddynamics.jagger.engine.e1.services.DefaultMetricService.taskId.

46  {
47  KeyValueStorage storage = context.getService(KeyValueStorage.class);
48 
49  storage.put(Namespace.of(sessionId, taskId, "metricDescription"),
50  metricDescription.getMetricId(),
51  metricDescription
52  );
53  }

Here is the call graph for this function: