Skip to content

Commit

Permalink
Merge pull request #8 from thejcfactor/AddCppMetrics
Browse files Browse the repository at this point in the history
Add metrics for C++
  • Loading branch information
programmatix authored Feb 6, 2025
2 parents d11bd1c + 3edb316 commit c273954
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
4 changes: 3 additions & 1 deletion vue/src/components/CPP.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<template>
<div>
<Shared :language="'C++'"></Shared>
<Metrics :language="'C++'"></Metrics>
<TransactionsShared :language="'C++'"></TransactionsShared>
</div>
</template>

<script>
import Shared from "@/components/Shared.vue";
import TransactionsShared from "@/components/TransactionsShared.vue";
import Metrics from "@/components/Metrics.vue";
export default {
components: {Shared, TransactionsShared}
components: {Metrics, Shared, TransactionsShared}
}
</script>

29 changes: 27 additions & 2 deletions vue/src/components/Metrics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
All these tests are doing KV gets in 20 threads.

<h2>Memory</h2>
Measures the maximum heap memory used in MB by the performer+SDK.
<Results :input="memHeapUsedMB"></Results>
<div v-if="hasHeapUsedMB">
Measures the maximum heap memory used in MB by the performer+SDK.
<Results :input="memHeapUsedMB"></Results>
</div>
<div v-if="hasRssUsedMB">
Measures the maximum RSS memory used in MB by the performer+SDK.
<Results :input="memRssUsedMB"></Results>
</div>

<h2>Thread Count</h2>
Measures the maximum thread count used by the performer+SDK.
Expand Down Expand Up @@ -54,6 +60,14 @@ export default {
}
},
hasHeapUsedMB() {
return ["go", "java", "kotlin", "scala"].includes(this.language.toLowerCase());
},
hasRssUsedMB() {
return ["c++", "node", "python", "ruby"].includes(this.language.toLowerCase());
},
memHeapUsedMB() {
return {
...sharedQuery(this.language),
Expand All @@ -65,6 +79,17 @@ export default {
}
},
memRssUsedMB() {
return {
...sharedQuery(this.language),
"yAxes": [{
"type": "metric",
"metric": "memRssUsedMB",
}],
mergingType: "Maximum",
}
},
threadCount() {
return {
...sharedQuery(this.language),
Expand Down

0 comments on commit c273954

Please sign in to comment.