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

Correctly clearing meter providers #50

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
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
20 changes: 10 additions & 10 deletions test/tmetrics.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function testAddMetricReader(testCase)
% adding a single value
ct.add(1);
pause(2.5);
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
result_count = numel(results);
verifyEqual(testCase,result_count, 2);
Expand Down Expand Up @@ -136,7 +136,7 @@ function testCounterBasic(testCase)
pause(2.5);

% fetch result
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};

Expand Down Expand Up @@ -180,7 +180,7 @@ function testCounterDelta(testCase)

% fetch results
pause(2.5);
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
dp1 = results{1}.resourceMetrics.scopeMetrics.metrics.sum.dataPoints;
dp2 = results{2}.resourceMetrics.scopeMetrics.metrics.sum.dataPoints;
Expand Down Expand Up @@ -219,7 +219,7 @@ function testCounterAddAttributes(testCase)
pause(2.5);

% fetch result
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};

Expand Down Expand Up @@ -263,7 +263,7 @@ function testCounterAddNegative(testCase)
pause(2.5);

% fetch results
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};
dp = results.resourceMetrics.scopeMetrics.metrics.sum.dataPoints;
Expand Down Expand Up @@ -303,7 +303,7 @@ function testUpDownCounterBasic(testCase)
pause(5);

% fetch result
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};

Expand Down Expand Up @@ -348,7 +348,7 @@ function testUpDownCounterAddAttributes(testCase)
pause(5);

% fetch result
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};
dp = results.resourceMetrics.scopeMetrics.metrics.sum.dataPoints;
Expand Down Expand Up @@ -397,7 +397,7 @@ function testHistogramBasic(testCase)
pause(10);

% fetch results
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};
dp = results.resourceMetrics.scopeMetrics.metrics.histogram.dataPoints;
Expand Down Expand Up @@ -454,7 +454,7 @@ function testHistogramRecordAttributes(testCase)
pause(10);

% fetch results
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
results = results{end};
dp = results.resourceMetrics.scopeMetrics.metrics.histogram.dataPoints;
Expand Down Expand Up @@ -511,7 +511,7 @@ function testHistogramDelta(testCase)
pause(2.5);

% fetch results
verifyTrue(testCase, p.shutdown());
clear p;
results = readJsonResults(testCase);
rsize = size(results);
for i = 1:rsize(2)
Expand Down
2 changes: 2 additions & 0 deletions test/tmetrics_sdk.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function testCustomResource(testCase)

pause(2.5);

clear mp;

% perform test comparisons
results = readJsonResults(testCase);
results = results{1};
Expand Down