Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: clarify [0,1] range for system.cpu.utilization metric test #85

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/opentelemetry-node/test/host-metrics.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ const testFixtures = [
'data points are present in system.cpu.utilization metric'
);
const allInRange = metric.gauge?.dataPoints.every(
(dp) => dp.asDouble < 1
(dp) => 0 <= dp.asDouble && dp.asDouble <= 1
);
t.ok(
allInRange,
'"system.cpu.utilization" data points have a value between 0-1'
'"system.cpu.utilization" data points are in the range [0,1]'
);
if (!allInRange) {
// Note: extra output to debug flaky test (https://github.com/elastic/elastic-otel-node/issues/73).
Expand Down
Loading