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

Update Performance Counter Names #1325

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
12 changes: 6 additions & 6 deletions src/metrics/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export enum StandardMetricNames {
}

export enum PerformanceCounterMetricNames {
PRIVATE_BYTES = "\\Process(??APP_WIN32_PROC??)\\Private Bytes",
AVAILABLE_BYTES = "\\Memory\\Available Bytes",
PROCESSOR_TIME = "\\Processor(_Total)\\% Processor Time",
PROCESS_TIME = "\\Process(??APP_WIN32_PROC??)\\% Processor Time",
REQUEST_RATE = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",
REQUEST_DURATION = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time",
PRIVATE_BYTES = "Private_Bytes",
AVAILABLE_BYTES = "Available_Bytes",
PROCESSOR_TIME = "Processor_Time",
PROCESS_TIME = "Process_Time",
REQUEST_RATE = "Request_Rate",
REQUEST_DURATION = "Request_Execution_Time",
}
12 changes: 6 additions & 6 deletions test/unitTests/metrics/performanceCounters.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("PerformanceCounterMetricsHandler", () => {

assert.deepStrictEqual(
metrics[0].descriptor.name,
"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"
"Request_Execution_Time"
);
assert.strictEqual(metrics[0].dataPoints.length, 1, "dataPoints count");
assert.strictEqual((metrics[0].dataPoints[0].value as Histogram).count, 10, "dataPoint count");
Expand All @@ -83,25 +83,25 @@ describe("PerformanceCounterMetricsHandler", () => {

assert.deepStrictEqual(
metrics[1].descriptor.name,
"\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec"
"Request_Rate"
);
assert.ok(metrics[1].dataPoints[0].value> 0, "Wrong request rate value");

assert.deepStrictEqual(
metrics[2].descriptor.name,
"\\Process(??APP_WIN32_PROC??)\\Private Bytes"
"Private_Bytes"
);
assert.ok(metrics[2].dataPoints[0].value > 0, "Wrong private bytes value");
assert.deepStrictEqual(metrics[3].descriptor.name, "\\Memory\\Available Bytes");
assert.deepStrictEqual(metrics[3].descriptor.name, "Available_Bytes");
assert.ok(metrics[3].dataPoints[0].value > 0, "Wrong available bytes value");
assert.deepStrictEqual(metrics[4].descriptor.name, "\\Processor(_Total)\\% Processor Time");
assert.deepStrictEqual(metrics[4].descriptor.name, "Processor_Time");
assert.ok(
metrics[4].dataPoints[0].value >= 0 && metrics[4].dataPoints[0].value <= 100,
`Wrong Processor Time value: ${metrics[4].dataPoints[0].value}`
);
assert.deepStrictEqual(
metrics[5].descriptor.name,
"\\Process(??APP_WIN32_PROC??)\\% Processor Time"
"Process_Time"
);
assert.ok(
metrics[5].dataPoints[0].value >= 0 && metrics[5].dataPoints[0].value <= 100,
Expand Down
Loading