diff options
| author | fumingwei <[email protected]> | 2023-05-26 12:21:19 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2023-05-26 14:28:21 +0800 |
| commit | d5389fb9f1cf48f413eb6cd7baad27a57efe2274 (patch) | |
| tree | 96ec2d00c5c48228f8e270a7f75792287c949c18 /src | |
| parent | a411e87fd7349d6183da2c9d0ed2512018ef2052 (diff) | |
bugfix:修复设置metric的invisible特性时,table的列信息没有隐藏问题v3.0.4
Diffstat (limited to 'src')
| -rw-r--r-- | src/fieldstat.cpp | 5 | ||||
| -rw-r--r-- | src/fieldstat_internal.h | 1 | ||||
| -rw-r--r-- | src/file_output.cpp | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/fieldstat.cpp b/src/fieldstat.cpp index 0caa896..4bdaa39 100644 --- a/src/fieldstat.cpp +++ b/src/fieldstat.cpp @@ -1137,5 +1137,10 @@ int fieldstat_set_metric_invisible_para(struct fieldstat_instance *instance, int metric = get_metric(instance, metric_id); metric->is_invisible = 1; + if(metric->table != NULL) + { + metric->table->column_invisible[metric->table_column_id] = 1; + } + return 0; }
\ No newline at end of file diff --git a/src/fieldstat_internal.h b/src/fieldstat_internal.h index eb3b5d0..db191c0 100644 --- a/src/fieldstat_internal.h +++ b/src/fieldstat_internal.h @@ -114,6 +114,7 @@ struct table_metric char *name; char *column_name[TABLE_COLUMN_SIZE]; enum field_type column_type[TABLE_COLUMN_SIZE]; + int column_invisible[TABLE_COLUMN_SIZE]; int column_cnt; int line_cnt; diff --git a/src/file_output.cpp b/src/file_output.cpp index 7416c1f..9b29ad4 100644 --- a/src/file_output.cpp +++ b/src/file_output.cpp @@ -268,6 +268,10 @@ static int output_file_format_default_table(struct fieldstat_instance *instance, for(j = 0; j < table->column_cnt; j ++) { //print table column + if(table->column_invisible[j] == 1) + { + continue; + } used_len += snprintf(print_buf + used_len, size - used_len, "%20.19s", table->column_name[j]); } for(j = 0; j < tables_line_cnt[i]; j++) //per line |
