Skip to content

Commit

Permalink
Set record_sampler non-array metric array_len spec to 0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Narate Taerat authored and tom95858 committed Nov 12, 2024
1 parent c6647b6 commit fc8dfb2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ldms/src/sampler/examples/record_sampler/record_sampler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit fc8dfb2

Please sign in to comment.