Skip to content

Commit

Permalink
Support for operators in storage decomposition
Browse files Browse the repository at this point in the history
These changes allow for the application of functional operators in
the generation of column data in decomposed rows.
  • Loading branch information
tom95858 committed Jun 1, 2024
1 parent af3c3ef commit 8fa6fa4
Show file tree
Hide file tree
Showing 9 changed files with 1,459 additions and 331 deletions.
8 changes: 8 additions & 0 deletions ldms/src/core/ldms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,9 @@ size_t __ldms_value_size_get(enum ldms_value_type t, uint32_t count)
case LDMS_V_RECORD_ARRAY:
vsz = sizeof(struct ldms_record_array);
break;
case LDMS_V_TIMESTAMP:
vsz = sizeof(struct ldms_timestamp);
break;
default:
assert(0 == "Unknown type");
return 0;
Expand All @@ -1385,6 +1388,11 @@ size_t __ldms_value_size_get(enum ldms_value_type t, uint32_t count)
return roundup(vsz, 8);
}

size_t ldms_metric_value_size_get(enum ldms_value_type t, uint32_t count)
{
return __ldms_value_size_get(t, count);
}

void __ldms_metric_size_get(const char *name, const char *unit,
enum ldms_value_type t,
uint32_t count, size_t *meta_sz, size_t *data_sz)
Expand Down
2 changes: 2 additions & 0 deletions ldms/src/core/ldms.h
Original file line number Diff line number Diff line change
Expand Up @@ -2864,6 +2864,7 @@ extern int ldms_schema_metric_add_with_unit(ldms_schema_t s, const char *name,
extern int ldms_schema_meta_add_with_unit(ldms_schema_t s, const char *name,
const char *unit, enum ldms_value_type t);

size_t ldms_metric_value_size_get(enum ldms_value_type t, uint32_t count);

/**
* \brief Return the heap bytes required
Expand Down Expand Up @@ -3564,6 +3565,7 @@ enum ldms_value_type ldms_record_metric_type_get(ldms_mval_t rec,
void ldms_record_metric_set(ldms_mval_t rec_inst, int metric_id,
ldms_mval_t val);


/**
* Set value to elements in the array metric in the record instance.
*
Expand Down
1 change: 1 addition & 0 deletions ldms/src/decomp/flex/decomp_flex.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ static int __decomp_flex_decompose(ldmsd_strgp_t strgp, ldms_set_t set,
return 0;
digest_rbn = dcfg->default_digest;
}
*row_count = 0;
for (i = 0; i < digest_rbn->n_decomp; i++) {
rcount = 0;
decomp_rbn = digest_rbn->decomp_rbn[i];
Expand Down
Loading

0 comments on commit 8fa6fa4

Please sign in to comment.