From fc8dfb254b422371ebf61a907d32d573e022733d Mon Sep 17 00:00:00 2001 From: Narate Taerat Date: Thu, 7 Nov 2024 15:55:05 -0600 Subject: [PATCH] Set record_sampler non-array metric `array_len` spec to 0 Set record_sampler non-array metric `array_len` spec to 0 (this will be stored in the descriptor in the set) so that the consequent components (e.g. store) shall fail if they incorrectly handle the length. --- .../examples/record_sampler/record_sampler.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ldms/src/sampler/examples/record_sampler/record_sampler.c b/ldms/src/sampler/examples/record_sampler/record_sampler.c index 269417afa..45deb9908 100644 --- a/ldms/src/sampler/examples/record_sampler/record_sampler.c +++ b/ldms/src/sampler/examples/record_sampler/record_sampler.c @@ -92,17 +92,17 @@ int rec_array_idx; #define stringify(_x) #_x struct rec_metric rec_metrics[] = { - { stringify(LDMS_V_CHAR), LDMS_V_CHAR, 1 }, - { stringify(LDMS_V_U8), LDMS_V_U8, 1 }, - { stringify(LDMS_V_S8), LDMS_V_S8, 1 }, - { stringify(LDMS_V_U16), LDMS_V_U16, 1 }, - { stringify(LDMS_V_S16), LDMS_V_S16, 1 }, - { stringify(LDMS_V_U32), LDMS_V_U32, 1 }, - { stringify(LDMS_V_S32), LDMS_V_S32, 1 }, - { stringify(LDMS_V_U64), LDMS_V_U64, 1 }, - { stringify(LDMS_V_S64), LDMS_V_S64, 1 }, - { stringify(LDMS_V_F32), LDMS_V_F32, 1 }, - { stringify(LDMS_V_D64), LDMS_V_D64, 1 }, + { stringify(LDMS_V_CHAR), LDMS_V_CHAR, 0 }, + { stringify(LDMS_V_U8), LDMS_V_U8, 0 }, + { stringify(LDMS_V_S8), LDMS_V_S8, 0 }, + { stringify(LDMS_V_U16), LDMS_V_U16, 0 }, + { stringify(LDMS_V_S16), LDMS_V_S16, 0 }, + { stringify(LDMS_V_U32), LDMS_V_U32, 0 }, + { stringify(LDMS_V_S32), LDMS_V_S32, 0 }, + { stringify(LDMS_V_U64), LDMS_V_U64, 0 }, + { stringify(LDMS_V_S64), LDMS_V_S64, 0 }, + { stringify(LDMS_V_F32), LDMS_V_F32, 0 }, + { stringify(LDMS_V_D64), LDMS_V_D64, 0 }, { stringify(LDMS_V_CHAR_ARRAY), LDMS_V_CHAR_ARRAY, ARRAY_COUNT }, { stringify(LDMS_V_U8_ARRAY), LDMS_V_U8_ARRAY, ARRAY_COUNT }, { stringify(LDMS_V_S8_ARRAY), LDMS_V_S8_ARRAY, ARRAY_COUNT },