casadm: Unify "4KiB Blocks" string
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
54d6435656
commit
9b17135694
@ -37,7 +37,7 @@
|
|||||||
#define IOCLASS_UNCLASSIFIED (0)
|
#define IOCLASS_UNCLASSIFIED (0)
|
||||||
|
|
||||||
#define UNIT_REQUESTS "Requests"
|
#define UNIT_REQUESTS "Requests"
|
||||||
#define UNIT_BLOCKS "4KiB blocks"
|
#define UNIT_BLOCKS "4KiB Blocks"
|
||||||
|
|
||||||
static inline float fraction(uint64_t numerator, uint64_t denominator)
|
static inline float fraction(uint64_t numerator, uint64_t denominator)
|
||||||
{
|
{
|
||||||
@ -197,7 +197,7 @@ static void print_core_conf(const struct kcas_core_info *info, FILE *outfile)
|
|||||||
info->core_path_name);
|
info->core_path_name);
|
||||||
print_kv_pair(outfile, "Exported Object", "/dev/cas%d-%d",
|
print_kv_pair(outfile, "Exported Object", "/dev/cas%d-%d",
|
||||||
info->cache_id, info->core_id);
|
info->cache_id, info->core_id);
|
||||||
print_kv_pair(outfile, "Core Size", "%lu, [4KiB Blocks], %.2f, [GiB]",
|
print_kv_pair(outfile, "Core Size", "%lu, [" UNIT_BLOCKS "], %.2f, [GiB]",
|
||||||
core_size, core_size_gb);
|
core_size, core_size_gb);
|
||||||
print_kv_pair_time(outfile, "Dirty for", info->info.dirty_for);
|
print_kv_pair_time(outfile, "Dirty for", info->info.dirty_for);
|
||||||
|
|
||||||
@ -532,7 +532,7 @@ int cache_stats_conf(int ctrl_fd, const struct kcas_cache_info *cache_info,
|
|||||||
cache_size = cache_line_in_4k(cache_info->info.size,
|
cache_size = cache_line_in_4k(cache_info->info.size,
|
||||||
cache_info->info.cache_line_size / KiB);
|
cache_info->info.cache_line_size / KiB);
|
||||||
|
|
||||||
print_kv_pair(outfile, "Cache Size", "%lu, [4KiB Blocks], %.2f, [GiB]",
|
print_kv_pair(outfile, "Cache Size", "%lu, [" UNIT_BLOCKS "], %.2f, [GiB]",
|
||||||
cache_size,
|
cache_size,
|
||||||
(float) cache_size * (4 * KiB) / GiB);
|
(float) cache_size * (4 * KiB) / GiB);
|
||||||
|
|
||||||
|
@ -229,10 +229,10 @@ int csv_process_row(struct view_t *this, int type, int num_fields, char *fields[
|
|||||||
* with units, so output every second value,
|
* with units, so output every second value,
|
||||||
* and use units to construct column headers.
|
* and use units to construct column headers.
|
||||||
* For example:
|
* For example:
|
||||||
* KV_PAIR,Cache Size,10347970,[4KiB blocks],39.47,[GiB]
|
* KV_PAIR,Cache Size,10347970,[4KiB Blocks],39.47,[GiB]
|
||||||
* will result in:
|
* will result in:
|
||||||
* data row: 10347970,39.47
|
* data row: 10347970,39.47
|
||||||
* header row: Cache Size [4KiB blocks],Cache Size [GiB]
|
* header row: Cache Size [4KiB Blocks],Cache Size [GiB]
|
||||||
*/
|
*/
|
||||||
case KV_PAIR:
|
case KV_PAIR:
|
||||||
for (i = 1; i < num_fields; i += 2) {
|
for (i = 1; i < num_fields; i += 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user