Skip to content

Commit

Permalink
Rename cage to enclave for metrics (#216)
Browse files Browse the repository at this point in the history
* Rename cage to enclave for metrics

* fix test

* typo
  • Loading branch information
hanneary authored Jun 25, 2024
1 parent 9cdcac3 commit 27026a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions e2e-tests/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ describe("Enclave is runnning", () => {
const stats = JSON.parse(result);
const keys = Object.keys(stats);
expect(keys).to.include(
"memory.total;cage_uuid=enclave_123;app_uuid=app_12345678"
"memory.total;enclave_uuid=enclave_123;app_uuid=app_12345678"
);
expect(keys).to.include(
"memory.avail;cage_uuid=enclave_123;app_uuid=app_12345678"
"memory.avail;enclave_uuid=enclave_123;app_uuid=app_12345678"
);
expect(keys).to.include(
"cpu.one;cage_uuid=enclave_123;app_uuid=app_12345678"
"cpu.one;enclave_uuid=enclave_123;app_uuid=app_12345678"
);
expect(keys).to.include(
"cpu.cores;cage_uuid=enclave_123;app_uuid=app_12345678"
"cpu.cores;enclave_uuid=enclave_123;app_uuid=app_12345678"
);
} finally {
sysClient.destroy();
Expand All @@ -199,7 +199,7 @@ describe("Enclave is runnning", () => {
const keys = Object.keys(stats);

expect(keys).to.include(
"decrypt.count;cage_uuid=enclave_123;app_uuid=app_12345678"
"decrypt.count;enclave_uuid=enclave_123;app_uuid=app_12345678"
);
} finally {
prodClient.destroy();
Expand Down
6 changes: 3 additions & 3 deletions shared/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ macro_rules! publish_gauge {
statsd_gauge!(
$label,
$val,
"cage_uuid" => &$context.uuid,
"enclave_uuid" => &$context.uuid,
"app_uuid" => &$context.app_uuid
);
};
Expand All @@ -31,7 +31,7 @@ macro_rules! publish_count {
statsd_count!(
$label,
$val,
"cage_uuid" => &$context.uuid,
"enclave_uuid" => &$context.uuid,
"app_uuid" => &$context.app_uuid
);
};
Expand All @@ -43,7 +43,7 @@ macro_rules! publish_count_dynamic_label {
statsd_count!(
$label,
$val,
"cage_uuid" => &$context.uuid,
"enclave_uuid" => &$context.uuid,
"app_uuid" => &$context.app_uuid
);
};
Expand Down

0 comments on commit 27026a2

Please sign in to comment.