Skip to content

Commit

Permalink
add comments to neuron test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-purang committed Aug 8, 2024
1 parent 971f2f4 commit 494867a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions plugins/processors/gpuattributes/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,15 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
}),
wantMetricCnt: 2,
want: []map[string]string{
// neuron_execution_latency
{
"ClusterName": "cluster",
"Drop": "val",
"percentile": "p50",
"runtime_tag": "DEFAULT",
"kubernetes": "{\"host\":\"test\",\"drop\":\"2\",\"labels\":\"label\"}",
},
// node_neuron_execution_latency
{
"ClusterName": "cluster",
"Type": "NodeAWSNeuron",
Expand All @@ -257,6 +259,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
}),
wantMetricCnt: 7,
want: []map[string]string{
// neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"Drop": "val",
Expand All @@ -267,6 +270,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"ContainerName": "testContainer",
"kubernetes": "{\"host\":\"test\",\"drop\":\"2\",\"labels\":\"label\"}",
},
// container_neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -276,6 +280,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"ContainerName": "testContainer",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// pod_neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -284,13 +289,15 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"PodName": "testPod",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// node_neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"NeuronCore": "core0",
"NeuronDevice": "device0",
"Type": "NodeAWSNeuronCore",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// container_neuroncore_memory_usage_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -300,6 +307,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"ContainerName": "testContainer",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// pod_neuroncore_memory_usage_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -308,6 +316,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"PodName": "testPod",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// node_neuroncore_memory_usage_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -330,6 +339,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
}),
wantMetricCnt: 3,
want: []map[string]string{
// neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"Drop": "val",
Expand All @@ -338,13 +348,15 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"NeuronDevice": "device0",
"kubernetes": "{\"host\":\"test\",\"drop\":\"2\",\"labels\":\"label\"}",
},
// node_neuroncore_memory_usage_constants
{
"ClusterName": "cluster",
"NeuronCore": "core0",
"NeuronDevice": "device0",
"Type": "NodeAWSNeuronCore",
"kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}",
},
// node_neuroncore_memory_usage_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -370,6 +382,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
}),
wantMetricCnt: 7,
want: []map[string]string{
// neurondevice_hw_ecc_events
{
"ClusterName": "cluster",
"Drop": "val",
Expand All @@ -381,6 +394,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"PodName": "testPod",
"ContainerName": "testContainer",
},
// container_neurondevice_hw_ecc_events_mem_ecc_corrected
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -390,6 +404,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"PodName": "testPod",
"ContainerName": "testContainer",
},
// pod_neurondevice_hw_ecc_events_mem_ecc_corrected
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -398,13 +413,15 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"kubernetes": "{\"host\":\"test\"}",
"PodName": "testPod",
},
// node_neurondevice_hw_ecc_events_mem_ecc_corrected
{
"ClusterName": "cluster",
"NeuronCore": "core0",
"NeuronDevice": "device0",
"Type": "NodeAWSNeuronDevice",
"kubernetes": "{\"host\":\"test\"}",
},
// container_neurondevice_hw_ecc_events_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -414,6 +431,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"PodName": "testPod",
"ContainerName": "testContainer",
},
// pod_neurondevice_hw_ecc_events_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand All @@ -422,6 +440,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) {
"kubernetes": "{\"host\":\"test\"}",
"PodName": "testPod",
},
// node_neurondevice_hw_ecc_events_total
{
"ClusterName": "cluster",
"NeuronCore": "core0",
Expand Down

0 comments on commit 494867a

Please sign in to comment.