@syntest/metric
Advanced tools
Comparing version 0.2.0-beta.0 to 0.2.0-beta.1
@@ -7,3 +7,3 @@ "use strict"; | ||
OptionGroups["Metric"] = "Metric Options:"; | ||
})(OptionGroups = exports.OptionGroups || (exports.OptionGroups = {})); | ||
})(OptionGroups || (exports.OptionGroups = OptionGroups = {})); | ||
exports.Configuration = { | ||
@@ -10,0 +10,0 @@ configureOptions(yargs) { |
@@ -28,3 +28,3 @@ "use strict"; | ||
MetricType["SERIES_MEASUREMENT"] = "series-measurement"; | ||
})(MetricType = exports.MetricType || (exports.MetricType = {})); | ||
})(MetricType || (exports.MetricType = MetricType = {})); | ||
var SeriesUnit; | ||
@@ -36,3 +36,3 @@ (function (SeriesUnit) { | ||
SeriesUnit["ITERATION"] = "iteration"; | ||
})(SeriesUnit = exports.SeriesUnit || (exports.SeriesUnit = {})); | ||
})(SeriesUnit || (exports.SeriesUnit = SeriesUnit = {})); | ||
//# sourceMappingURL=Metric.js.map |
@@ -23,2 +23,3 @@ "use strict"; | ||
const logging_1 = require("@syntest/logging"); | ||
const Metric_1 = require("./Metric"); | ||
class MetricManager { | ||
@@ -125,2 +126,3 @@ getNamespaced(namespace) { | ||
const found = this.metrics.find((m) => { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison | ||
if (m.type !== split[0]) { | ||
@@ -130,14 +132,14 @@ return false; | ||
switch (m.type) { | ||
case "property": | ||
case "distribution": { | ||
case Metric_1.MetricType.PROPERTY: | ||
case Metric_1.MetricType.DISTRIBUTION: { | ||
return split[1] === "*" || m.name === split[1]; | ||
} | ||
case "series": | ||
case "series-distribution": | ||
case "series-measurement": { | ||
case Metric_1.MetricType.SERIES: | ||
case Metric_1.MetricType.SERIES_DISTRIBUTION: | ||
case Metric_1.MetricType.SERIES_MEASUREMENT: { | ||
return ((split[1] === "*" || m.name === split[1]) && | ||
(split[2] === "*" || m.seriesUnit === split[2])); | ||
(split[2] === "*" || m.seriesUnit === split[2]) // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison | ||
); | ||
} | ||
} | ||
return false; | ||
}); | ||
@@ -167,11 +169,11 @@ if (!found) { | ||
switch (metric.type) { | ||
case "property": { | ||
case Metric_1.MetricType.PROPERTY: { | ||
this.properties.set(metric.name, ""); | ||
break; | ||
} | ||
case "distribution": { | ||
case Metric_1.MetricType.DISTRIBUTION: { | ||
this.distributions.set(metric.name, []); | ||
break; | ||
} | ||
case "series": { | ||
case Metric_1.MetricType.SERIES: { | ||
if (!this.series.has(metric.name)) { | ||
@@ -183,3 +185,3 @@ this.series.set(metric.name, new Map()); | ||
} | ||
case "series-distribution": { | ||
case Metric_1.MetricType.SERIES_DISTRIBUTION: { | ||
if (!this.seriesDistributions.has(metric.name)) { | ||
@@ -193,3 +195,3 @@ this.seriesDistributions.set(metric.name, new Map()); | ||
} | ||
case "series-measurement": { | ||
case Metric_1.MetricType.SERIES_MEASUREMENT: { | ||
if (!this.seriesMeasurements.has(metric.name)) { | ||
@@ -196,0 +198,0 @@ this.seriesMeasurements.set(metric.name, new Map()); |
/* | ||
* Copyright 2020-<%= YEAR %> SynTest contributors | ||
* | ||
* This file is part of SynTest Framework - SynTest Framework. | ||
* This file is part of SynTest Framework. | ||
* | ||
@@ -6,0 +6,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
{ | ||
"name": "@syntest/metric", | ||
"version": "0.2.0-beta.0", | ||
"version": "0.2.0-beta.1", | ||
"description": "SynTest library for collecting and storing metrics", | ||
@@ -47,4 +47,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@syntest/diagnostics": "^0.1.0-beta.0", | ||
"@syntest/logging": "^0.2.0-beta.2", | ||
"@syntest/diagnostics": "^0.1.0-beta.1", | ||
"@syntest/logging": "^0.2.0-beta.3", | ||
"yargs": "^17.7.1" | ||
@@ -58,3 +58,3 @@ }, | ||
}, | ||
"gitHead": "3f6b9612c030ffc79d5e79c5c1c126ca816a87a6" | ||
"gitHead": "356b34fb993a0c743833f97c1c86d93939a1327c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105881
716