diff options
| author | chenzizhan <[email protected]> | 2023-10-07 11:32:17 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2023-10-07 11:32:17 +0800 |
| commit | bf4c060bd5cb4d190824dc7b112a09f3caabcbdf (patch) | |
| tree | 96e27906c26ad7615ce3185bd3f8b4331b6ee679 /src/fieldstat.c | |
| parent | 1a859ba545ad04b8262ede9c2a02a3fbceed062f (diff) | |
get max cell id -> get max sampling
Diffstat (limited to 'src/fieldstat.c')
| -rw-r--r-- | src/fieldstat.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fieldstat.c b/src/fieldstat.c index 0f3cffc..e086ffd 100644 --- a/src/fieldstat.c +++ b/src/fieldstat.c @@ -1032,7 +1032,7 @@ int fieldstat_get_metrics_used_by_cube(const struct fieldstat *instance, int cub int all_available_metric_count = 0; if (cube->valid_metric_arr_len == 0) { - return 0; + return FS_OK; } int *tmp_ids = (int *)malloc(sizeof(int) * cube->valid_metric_arr_len); for (int i = 0; i < cube->valid_metric_arr_len; i++) { @@ -1045,7 +1045,7 @@ int fieldstat_get_metrics_used_by_cube(const struct fieldstat *instance, int cub } if (all_available_metric_count == 0) { free(tmp_ids); - return 0; + return FS_OK; } *metric_id_out = tmp_ids; @@ -1355,16 +1355,14 @@ void fieldstat_get_cells_used_by_cube(const struct fieldstat *instance, int cube *n_cell = n_cell_ret; } -int fieldstat_get_max_cell_id(const struct fieldstat *instance, int cube_id) +int fieldstat_get_used_sampling(const struct fieldstat *instance, int cube_id) { const struct fs_cube *cube = instance->cube[cube_id]; if (cube == NULL) { return FS_ERR_INVALID_CUBE_ID; } - int max_id; - (void)cell_manager_dump(cube->cell_manager, &max_id); - return max_id; + return cell_manager_get_cardinality(cube->cell_manager); } int fieldstat_find_cube(const struct fieldstat *instance, const struct fieldstat_tag *shared_tags, size_t n_shared_tags) |
