From 494867ad8133a2a2c6b43295272f8273f0a39370 Mon Sep 17 00:00:00 2001 From: Aditya Purang <44022838+aditya-purang@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:33:36 +0100 Subject: [PATCH] add comments to neuron test cases --- .../gpuattributes/processor_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugins/processors/gpuattributes/processor_test.go b/plugins/processors/gpuattributes/processor_test.go index f9e3366ae0..d60a409504 100644 --- a/plugins/processors/gpuattributes/processor_test.go +++ b/plugins/processors/gpuattributes/processor_test.go @@ -228,6 +228,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { }), wantMetricCnt: 2, want: []map[string]string{ + // neuron_execution_latency { "ClusterName": "cluster", "Drop": "val", @@ -235,6 +236,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "runtime_tag": "DEFAULT", "kubernetes": "{\"host\":\"test\",\"drop\":\"2\",\"labels\":\"label\"}", }, + // node_neuron_execution_latency { "ClusterName": "cluster", "Type": "NodeAWSNeuron", @@ -257,6 +259,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { }), wantMetricCnt: 7, want: []map[string]string{ + // neuroncore_memory_usage_constants { "ClusterName": "cluster", "Drop": "val", @@ -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", @@ -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", @@ -284,6 +289,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "PodName": "testPod", "kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}", }, + // node_neuroncore_memory_usage_constants { "ClusterName": "cluster", "NeuronCore": "core0", @@ -291,6 +297,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "Type": "NodeAWSNeuronCore", "kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}", }, + // container_neuroncore_memory_usage_total { "ClusterName": "cluster", "NeuronCore": "core0", @@ -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", @@ -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", @@ -330,6 +339,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { }), wantMetricCnt: 3, want: []map[string]string{ + // neuroncore_memory_usage_constants { "ClusterName": "cluster", "Drop": "val", @@ -338,6 +348,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "NeuronDevice": "device0", "kubernetes": "{\"host\":\"test\",\"drop\":\"2\",\"labels\":\"label\"}", }, + // node_neuroncore_memory_usage_constants { "ClusterName": "cluster", "NeuronCore": "core0", @@ -345,6 +356,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "Type": "NodeAWSNeuronCore", "kubernetes": "{\"host\":\"test\",\"labels\":\"label\"}", }, + // node_neuroncore_memory_usage_total { "ClusterName": "cluster", "NeuronCore": "core0", @@ -370,6 +382,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { }), wantMetricCnt: 7, want: []map[string]string{ + // neurondevice_hw_ecc_events { "ClusterName": "cluster", "Drop": "val", @@ -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", @@ -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", @@ -398,6 +413,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "kubernetes": "{\"host\":\"test\"}", "PodName": "testPod", }, + // node_neurondevice_hw_ecc_events_mem_ecc_corrected { "ClusterName": "cluster", "NeuronCore": "core0", @@ -405,6 +421,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "Type": "NodeAWSNeuronDevice", "kubernetes": "{\"host\":\"test\"}", }, + // container_neurondevice_hw_ecc_events_total { "ClusterName": "cluster", "NeuronCore": "core0", @@ -414,6 +431,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "PodName": "testPod", "ContainerName": "testContainer", }, + // pod_neurondevice_hw_ecc_events_total { "ClusterName": "cluster", "NeuronCore": "core0", @@ -422,6 +440,7 @@ func TestProcessMetricsForNeuronMetrics(t *testing.T) { "kubernetes": "{\"host\":\"test\"}", "PodName": "testPod", }, + // node_neurondevice_hw_ecc_events_total { "ClusterName": "cluster", "NeuronCore": "core0",