struct fstats_report *reports_with_stats;
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
- #define LS3_GET_ERROR_COUNT(stats, error) \
+ #define LS3_GET_ERROR_COUNT(stats, error) \
(atomic_load(&(stats)->fr_errors[(error)]))
#define LS3_INC_ERROR_COUNT(stats, error) \
- atomic_fetch_add_explicit(&(stats)->fr_errors[(error)], \
+ atomic_fetch_add_explicit(&(stats)->fr_errors[(error)], \
1, memory_order_relaxed);
#define LS3_INIT_ERRORS_COUNT(stats) \
#define LS3_DESTROY_ERRORS_COUNT(stats)
#else
- #define LS3_GET_ERROR_COUNT(stats, error) \
+ #define LS3_GET_ERROR_COUNT(stats, error) \
((stats)->fr_errors[(error)])
#define LS3_INC_ERROR_COUNT(stats, error) \
- do { \
+ do { \
pthread_mutex_lock(&(stats)->fr_error_mutex); \
(stats)->fr_errors[(error)]++; \
pthread_mutex_unlock(&(stats)->fr_error_mutex); \
- } while(0)
+ } while(0)
#define LS3_INIT_ERRORS_COUNT(stats) \
pthread_mutex_init(&(stats)->fr_error_mutex, NULL);
LS3_STATS_ERROR_GET_STRIPE_CNT},
{"Failed to get stripe size", "FailedToGetStripeSize",
LS3_STATS_ERROR_GET_STRIPE_SIZE},
- {NULL, NULL, LS3_STATS_ERROR_END_MARKER} /* End marker */
+ {NULL, NULL, LS3_STATS_ERROR_END_MARKER} /* End marker */
};
static const ls3_stats_extension_mapping ext_mappings[] = {
{"yaml", LS3_STATS_FILE_EXTENSION_YAML},
{"csv", LS3_STATS_FILE_EXTENSION_CSV},
{"all", LS3_STATS_FILE_EXTENSION_ALL}, /* Should always be the last */
- {NULL, 0} /* End marker */
+ {NULL, 0} /* End marker */
};
static const ls3_stats_out_mapping ls3_out_mappings[] = {
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % of "
- "total # of files;\n"
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent of "
+ "total number of files;\n"
"total_size - Total size of files in range;\n"
- "pct_rng - Total size of files in range as a % of total size "
- "of files;\n"
- "cpt_rng - Total size of files in this range or smaller as a % of "
- "total size of files;\n"
+ "pct_rng - Total size of files in range as percent of total size "
+ "of files;\n"
+ "cpt_rng - Total size of files in this range or smaller as "
+ "percent of total size of files;\n"
"min_size - Minimum file size in range;\n"
"max_size - Maximum file size in range.\n",
"____file_size_range____ ___number___ pct_num cpt_num total_size "
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total "
- "number of files;\n"
+ "number of files;\n"
"cpt_num - Number of files in this range or smaller as "
- "a % of total # of file;\n"
+ "percent of total number of file;\n"
"total_used - Total capacity used in range;\n"
- "pct_rng - Total capacity used in range as a % of total "
- "capacity used;\n"
+ "pct_rng - Total capacity used in range as percent of total "
+ "capacity used;\n"
"cpt_rng - Total capacity used in this range or smaller as "
- "a % of total capacity;\n"
+ "percent of total capacity;\n"
"min_size - Minimum file size (in blocks) in range;\n"
"max_size - Maximum file size (in blocks) in range.\n",
"__file_capacity_range__ ___number___ pct_num cpt_num total_used "
"Average file size (in blocks): %s\n"
"Total capacity used of all files: %s\n",
LS3_STATS_TYPE_CAPACITY_USED},
- {"Equal overhead (Files whose capacity used is equal to their size)",
+ {"Equal overhead (Files with capacity used equal to its size)",
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % of "
- "total # of files;\n"
- "total_size - Total size that overflowed in range;\n"
- "pct_rng - Total kilobytes that overflowed in this range as "
- "a % of total kilobytes that overflowed;\n"
- "cpt_rng - Total kilobytes that overflowed in this range or "
- "smaller as a % of total kilobytes that overflowed;\n"
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent of "
+ "total number of files;\n"
+ "total_size - Total size of files within this range;\n"
+ "pct_rng - Total kilobytes of files in this range as "
+ "percent of total kilobytes in range ;\n"
+ "cpt_rng - Total kilobytes in this range or smaller as percent "
+ "of total kilobytes in all ranges;\n"
"min_size - Minimum file size in range;\n"
"max_size - Maximum file size in range.\n",
"______size_range_______ ___number___ pct_num cpt_num total_size "
"Average file size (in blocks): %s\n"
"Total capacity used of all files: %s\n",
LS3_STATS_TYPE_EQUAL_OVERHEAD},
- {"Positive overhead (Files whose capacity used is larger than "
- "to it's size)",
+ {"Positive overhead (Files with capacity used larger than its size)",
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total "
- "number of files;\n"
+ "number of files;\n"
"cpt_num - Number of files in this range or smaller "
- "as a % of total # of files;\n"
+ "as percent of total number of files;\n"
"total_size - Total size that overflowed in range;\n"
"pct_rng - Total bytes that overflowed in this range "
- "as a % of total bytes that overflowed;\n"
+ "as percent of total bytes that overflowed;\n"
"cpt_rng - Total bytes that overflowed in this range or "
- "smaller as a % of total bytes that overflowed;\n"
+ "smaller as percent of total bytes that overflowed;\n"
"min_size - Minimum file size in range;\n"
"max_size - Maximum file size in range.\n",
"__range_of_diff_sizes__ ___number___ pct_num cpt_num total_size "
"Average file size (in blocks): %s\n"
"Total capacity used of all files: %s\n",
LS3_STATS_TYPE_POSITIVE_OVERHEAD},
- {"Negative overhead (Files whose size is larger than capacity used.)",
+ {"Negative overhead (Files wth capacity used smaller than its size)",
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total "
- "number of files;\n"
- "cpt_num - Number of files in this range or smaller as a % of "
- "total # of files;\n"
+ "number of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent of "
+ "total number of files;\n"
"total_size - Total size that underflowed in range;\n"
- "pct_rng - Total bytes that underflowed in this range as a % "
- "of total bytes that underflowed;\n"
- "cpt_rng - Total bytes that underflowed in this range or "
- "smaller as a % of total bytes that underflowed;\n"
+ "pct_rng - Total bytes that underflowed in this range as percent "
+ "of total bytes that underflowed;\n"
+ "cpt_rng - Total bytes that underflowed in this range or "
+ "smaller as percent of total bytes that underflowed;\n"
"min_size - Minimum value in range;\n"
"max_size - Maximum value in range.\n",
"__range_of_diff_sizes__ ___number___ pct_num cpt_num total_size "
"Description:\n"
"number - Count of files in range;\n"
"pct_num - Number of files in range as a percent of total "
- "number of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total # of files;\n"
- "total_size - Total compression size of files in range;\n"
- "pct_rng - Total compression size of files in range as a % of "
- "total compression size of files;\n"
- "cpt_rng - Total compression size of files in this range or "
- "smaller as a % of total compression size of files;\n"
+ "number of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
+ "total_size - Total compressed size of files in range;\n"
+ "pct_rng - Total compressed size of files in range as percent of "
+ "total compressed size of files;\n"
+ "cpt_rng - Total compressed size of files in this range or "
+ "smaller as percent of total compressed size of files;\n"
"min - Minimum compression ratio in range;\n"
"max - Maximum compression ratio in range.\n",
"compression_ratio ___number___ pct_num cpt_num total_size "
{"Directory size (entries)",
"Description:\n"
"number - Count of directories in range;\n"
- "pct_num - Number of dirs in range as a % of total "
- "num of dirs;\n"
+ "pct_num - Number of dirs in range as percent of total "
+ "num of dirs;\n"
"cpt_num - Number of dirs in this range or smaller as "
- "a % total number of dirs;\n"
+ "percent total number of dirs;\n"
"tot_entries - Total entries in range;\n"
- "pct_rng - Number of entries in range as a % of total number "
- "of entries;\n"
- "cpt_rng - Number of entries in this range or smaller as a % "
- "of total number of entries;\n"
+ "pct_rng - Number of entries in range as percent of total number "
+ "of entries;\n"
+ "cpt_rng - Number of entries in this range or smaller as percent "
+ "of total number of entries;\n"
"min - Minimum entries in range;\n"
"max - Maximum entries in range.\n",
"______range_of_entries_______ ___number___ pct_num cpt_num "
"Description:\n"
"number - Count of directories in range;\n"
"pct_num - Number of files in dirs as a percent of total "
- "number of dirs;\n"
- "cpt_num - Number of dirs in this range or smaller as a % of "
- "total # of dirs;\n"
+ "number of dirs;\n"
+ "cpt_num - Number of dirs in this range or smaller as percent of "
+ "total number of dirs;\n"
"total_size - Total size of dirs in range;\n"
- "pct_rng - Total size of dirs in range as a % of total size "
- "of dirs;\n"
- "cpt_rng - Total size of dirs in this range or smaller as a % "
- "of total size of dirs;\n"
+ "pct_rng - Total size of dirs in range as percent of total size "
+ "of dirs;\n"
+ "cpt_rng - Total size of dirs in this range or smaller as percent "
+ "of total size of dirs;\n"
"min_size - Minimum directory size in range;\n"
"max_size - Maximum directory size in range.\n",
"____directory_size_range_____ ___number___ pct_num cpt_num total_size"
{"Link count (of regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total files;\n"
- "cpt_num - Number of files in this range or smaller as a % of "
- "total files;\n"
+ "pct_num - Number of files in range as percent of total files;\n"
+ "cpt_num - Number of files in this range or smaller as percent of "
+ "total files;\n"
"tot_links - Total links in range;\n"
- "pct_rng - Total links in range as a % of total links;\n"
- "cpt_rng - Total links in this range or smaller as a % of "
- "total links;\n"
+ "pct_rng - Total links in range as percent of total links;\n"
+ "cpt_rng - Total links in this range or smaller as percent of "
+ "total links;\n"
"min - Minimum link count in range;\n"
"max - Maximum link count in range.\n",
"____rnage_of_link_counts_____ ___number___ pct_num cpt_num tot_links "
"special files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Count of files in range as a % of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total # of files;\n"
+ "pct_num - Count of files in range as percent of total number "
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
"total_chars - Total chars of filenames in range;\n"
- "pct_rng - Total chars of filenames in range as a % of total "
- "number of chars of filenames;\n"
+ "pct_rng - Total chars of filenames in range as percent of total "
+ "number of chars of filenames;\n"
"cpt_rng - Total number of chars of filenames in this range or "
- "smaller as a % of total number bytes of filenames;\n"
+ "smaller as percent of total filename chars;\n"
"min - Minimum chars in range;\n"
"max - Maximum chars in range.\n",
"fname_length_range ___number___ pct_num cpt_num total_chars "
"Average chars in ranges: %s\n"
"Total chars in rnages: %s\n",
LS3_STATS_TYPE_FILENAME_LENGTH},
- {"Time since last modification [mtime](Regular files)",
+ {"Time since last data modification [mtime](Regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total number of files;\n"
+ "pct_num - Number of files in range as percent of total number "
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
"total_size - Total size that underflowed in range;\n"
- "pct_rng - Total of age in range, total age in range as a % "
- "of total age of all files;\n"
- "cpt_rng - total age in this range or smaller as a % of "
- "total age of all files;\n"
+ "pct_rng - Total of age in range, total age in range as percent "
+ "of total age of all files;\n"
+ "cpt_rng - total age in this range or smaller as percent of "
+ "total age of all files;\n"
"min - Minimum value in range;\n"
"max - Maximum value in range.\n",
"__range_in_days_ ___number___ pct_num cpt_num total_size "
"Average days in ranges: %s\n"
"Total capacity size of all days: %s\n",
LS3_STATS_TYPE_TIME_SINCE_LAST_MOD_RF},
- {"Time since last metadata modification [ctime](Regular files)",
+ {"Time since last metadata change [ctime](Regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total number of files;\n"
+ "pct_num - Number of files in range as percent of total number "
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
"total_size - Total size that underflowed in range;\n"
- "pct_rng - Total of age in range, total age in range as a % "
- "of total age of all files;\n"
- "cpt_rng - Total age in this range or smaller as a % of total "
- "age of all files;\n"
+ "pct_rng - Total of age in range, total age in range as percent "
+ "of total age of all files;\n"
+ "cpt_rng - Total age in this range or smaller as percent of total "
+ "age of all files;\n"
"min - Minimum days in range;\n"
"max - Maximum days in range.\n",
"__range_in_days_ ___number___ pct_num cpt_num total_size "
{"Time since creation [crtime](Regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total number of files;\n"
+ "pct_num - Number of files in range as percent of total number "
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
"total_size - Total size that underflowed in range;\n"
- "pct_rng - Total of age in range, total age in range as a % "
- "of total age of all files;\n"
- "cpt_rng - Total age in this range or smaller as a % of total "
- "age of all files;\n"
+ "pct_rng - Total of age in range, total age in range as percent "
+ "of total age of all files;\n"
+ "cpt_rng - Total age in this range or smaller as percent of "
+ "total age of all files;\n"
"min - Minimum days in range;\n"
"max - Maximum days in range.\n",
"__range_in_days_ ___number___ pct_num cpt_num total_size "
{"Time since last access [atime](Regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total number "
- "of files;\n"
- "cpt_num - Number of files in this range or smaller as a % "
- "of total number of files;\n"
+ "pct_num - Number of files in range as percent of total number "
+ "of files;\n"
+ "cpt_num - Number of files in this range or smaller as percent "
+ "of total number of files;\n"
"total_size - Total size that underflowed in range;\n"
- "pct_rng - Total of age in range, total age in range as a % "
- "of total age of all files;\n"
- "cpt_rng - Total age in this range or smaller as a % of total "
- "age of all files;\n"
+ "pct_rng - Total of age in range, total age in range as percent "
+ "of total age of all files;\n"
+ "cpt_rng - Total age in this range or smaller as percent of total "
+ "age of all files;\n"
"min - Minimum days in range;\n"
"max - Maximum days in range.\n",
"__range_in_days_ ___number___ pct_num cpt_num total_size "
"Description:\n"
"number - Count of files for user;\n"
"pct_num - Number of files for user as a percent of total "
- "number of files;\n"
- "cpt_num - Number of files for user as a % of total # of files;\n"
+ "number of files;\n"
+ "cpt_num - Number of files for user as percent of total number of "
+ "files;\n"
"total_size - Total size of files for user;\n"
- "pct_rng - Total size of files for user as a % of total size "
- "of files;\n"
- "cpt_rng - Total size of files for user or smaller as a % of "
- "total size of files;\n"
+ "pct_rng - Total size of files for user as percent of total size "
+ "of files;\n"
+ "cpt_rng - Total size of files for user or smaller as percent of "
+ "total size of files;\n"
"min_size - Minimum file size for the user;\n"
"max_size - Maximum file size for the user.\n",
"________UID_and_name_______ ___number___ pct_num cpt_num total_size "
"Description:\n"
"number - Count of files for group;\n"
"pct_num - Number of files for group as a percent of total "
- "number of files;\n"
- "cpt_num - Number of files for group as a % of total # of files;\n"
+ "number of files;\n"
+ "cpt_num - Number of files for group as percent of total number "
+ "of files;\n"
"total_size - Total size of files for group;\n"
- "pct_rng - Total size of files for group as a % of total "
- "size of files;\n"
+ "pct_rng - Total size of files for group as percent of total "
+ "size of files;\n"
"cpt_rng - Total size of files for group or smaller as "
- "a % of total size of files;\n"
+ "percent of total size of files;\n"
"min_size - Minimum file size for the group;\n"
"max_size - Maximum file size for the group.\n",
"_______GUID_and_name_______ ___number___ pct_num cpt_num total_size "
{"Storage size (Regular files) by project ID",
"Description:\n"
"number - Count of files for projid;\n"
- "pct_num - Number of files for projid as a percent of total "
- "number of files;\n"
- "cpt_num - Number of files for projid as a % of "
- "total # of files;\n"
+ "pct_num - Number of files for projid as percent of total "
+ "number of files;\n"
+ "cpt_num - Number of files for projid as percent of "
+ "total number of files;\n"
"total_size - Total size of files for projid;\n"
- "pct_rng - Total size of files for projid as a % of total "
- "size of files;\n"
- "cpt_rng - Total size of files for projid or smaller as a % "
- "of total size of files;\n"
+ "pct_rng - Total size of files for projid as percent of total "
+ "size of files;\n"
+ "cpt_rng - Total size of files for projid or smaller as a "
+ "percentage of total size of files;\n"
"min_size - Minimum file size for the projid;\n"
"max_size - Maximum file size for the projid.\n",
"_project_ID_ ___number___ pct_num cpt_num total_size "
{"Stripe count (of regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total files;\n"
- "cpt_num - Number of files in this range as a % of total files;\n"
+ "pct_num - Number of files in range as percent of total files;\n"
+ "cpt_num - Number of files in this range as percent of total files;\n"
"total_size - Total size of files with this stripe count;\n"
- "pct_rng - Total size in range as a % of total stripe;\n"
- "cpt_rng - Total size in this range as a % of total stripe;\n"
+ "pct_rng - Total size in range as percent of total stripe;\n"
+ "cpt_rng - Total size in this range as percent of total stripe;\n"
"min_size - Minimum size of files with this stripe count;\n"
"max_size - Maximum size of files with this stripe count.\n",
"stripe_count ___number___ pct_num cpt_num total_size pct_rng cpt_rng "
{"Stripe size (of regular files)",
"Description:\n"
"number - Count of files with stripe size;\n"
- "pct_num - Number of files with stripe size as a % of "
- "total files;\n"
- "cpt_num - Number of files with this stripe size as a % of "
- "total files;\n"
+ "pct_num - Number of files with stripe size as percent of "
+ "total files;\n"
+ "cpt_num - Number of files with this stripe size as percent of "
+ "total files;\n"
"total_size - Total files size with this stripe size;\n"
- "pct_rng - Total file size with stripe size as a % "
- "of total size;\n"
+ "pct_rng - Total file size with stripe size as percent "
+ "of total size;\n"
"cpt_rng - Total file size with this stripe size or smaller as "
- "a % of total file;\n"
+ "percent of total file;\n"
"min_size - Minimum size of files with this stripe size;\n"
"max_size - Maximum size of files with this stripe size.\n",
"stripe_size ___number___ pct_num cpt_num total_size pct_rng cpt_rng "
{"Mirror count (of regular files)",
"Description:\n"
"number - Count of files in range;\n"
- "pct_num - Number of files in range as a % of total files;\n"
- "cpt_num - Number of files in this range as a % "
- "of total files;\n"
+ "pct_num - Number of files in range as percent of total files;\n"
+ "cpt_num - Number of files in this range as percent "
+ "of total files;\n"
"total_size - Total size of files with this mirror count;\n"
- "pct_rng - Total mirror in range as a % of total mirror;\n"
- "cpt_rng - Total mirror in this range as a % of "
- "total mirror;\n"
+ "pct_rng - Total mirror in range as percent of total mirror;\n"
+ "cpt_rng - Total mirror in this range as percent of "
+ "total mirror;\n"
"min_size - Minimum size of files with this mirror count;\n"
"max_size - Maximum size of files with this mirror count.\n",
"mirror_cnt ___number___ pct_num cpt_num total_size pct_rng cpt_rng "
/* Fill for range_ptr. */
snprintf(result.srv_min, sizeof(result.srv_min),
"%s",
- ls3_stats_fmt_size_units(range_ptr->rrt_min *
+ ls3_stats_fmt_size_units(range_ptr->rrt_min *
1024));
snprintf(result.srv_max, sizeof(result.srv_max),
"%s",
/* Fill for report_ptr */
snprintf(result.srv_min, sizeof(result.srv_min),
"%s",
- ls3_stats_fmt_size_units(report_ptr->rt_min *
+ ls3_stats_fmt_size_units(report_ptr->rt_min *
1024));
snprintf(result.srv_max, sizeof(result.srv_max),
"%s",
"%.0f", range_ptr->rrt_max);
snprintf(result.srv_total, sizeof(result.srv_total),
"%s", ls3_stats_fmt_size_units(1024 *
- range_ptr->total_in_range));
+ range_ptr->total_in_range));
} else {
snprintf(result.srv_min, sizeof(result.srv_min),
"%.0f", report_ptr->rt_min);
"%.0f", report_ptr->rt_avg);
snprintf(result.srv_total, sizeof(result.srv_total),
"%s", ls3_stats_fmt_size_units(1024 *
- report_ptr->total_value));
+ report_ptr->total_value));
}
return result;
"%6.2f%%", range_ptr->rrt_max);
snprintf(result.srv_total, sizeof(result.srv_total),
"%s", ls3_stats_fmt_size_units(1024 *
- range_ptr->total_in_range));
+ range_ptr->total_in_range));
} else {
snprintf(result.srv_min, sizeof(result.srv_min),
"%.2f%%", report_ptr->rt_min);
"%.2f%%", report_ptr->rt_avg);
snprintf(result.srv_total, sizeof(result.srv_total),
"%s", ls3_stats_fmt_size_units(1024 *
- report_ptr->total_value));
+ report_ptr->total_value));
}
return result;
}
/* when using lipe_scan3 --collect-fsize-stats without path to file */
- if (!reports_with_stats->report_file_name) {
+ if (!reports_with_stats->report_file_name) {
char format_buffer[512];
char file_name_buffer[512];
struct tm *timeinfo = localtime(&reports_with_stats->start_time);
{
case LS3_STATS_TYPE_STORAGE_SET_SIZE_BY_USER:
snprintf(str, strlen,
- "%10ld (%14s)", range_ptr->rrt_id,
+ "%10ld (%14s)", range_ptr->rrt_id,
ls3_stats_get_username_from_uid(range_ptr->rrt_id));
break;
case LS3_STATS_TYPE_STORAGE_SET_SIZE_BY_GROUP:
snprintf(str, strlen,
- "%10ld (%14s)", range_ptr->rrt_id,
+ "%10ld (%14s)", range_ptr->rrt_id,
ls3_stats_get_groupname_from_gid(range_ptr->rrt_id));
break;
case LS3_STATS_TYPE_STORAGE_SET_SIZE_BY_PROJID:
" Never changed ");
else
snprintf(str, strlen,
- "%4.0f - %4.0f days",
+ "%4.0f - %4.0f days",
range_ptr->range_start,
- range_ptr->range_end);
+ range_ptr->range_end);
break;
case LS3_STATS_TYPE_COMPRESSION_RATIO:
snprintf(str, strlen,
- "%6.2f - %6.2f %%", range_ptr->range_start,
- range_ptr->range_end);
+ "%6.2f - %6.2f %%", range_ptr->range_start,
+ range_ptr->range_end);
break;
case LS3_STATS_TYPE_FILES_SIZE:
case LS3_STATS_TYPE_POSITIVE_OVERHEAD:
break;
} default:
snprintf(str, strlen,
- "%8.0f - %8.0f", range_ptr->range_start,
- range_ptr->range_end);
+ "%8.0f - %8.0f", range_ptr->range_start,
+ range_ptr->range_end);
break;
}
}
switch (rtype)
{
case LS3_STATS_USERS_REPORTS_MOD_RF:
- return "Time since last modification (mtime)";
+ return "Time since last data modification (mtime)";
case LS3_STATS_USERS_REPORTS_MD_MOD_RF:
- return "Time since last metadata modification (ctime)";
+ return "Time since last metadata change (ctime)";
case LS3_STATS_USERS_REPORTS_CREATION_RF:
return "Time since creation (crtime)";
case LS3_STATS_USERS_REPORTS_ACCESS_RF:
range_ptr,
i, true);
fprintf(out_fd, text_tmpl->som_fmt_range_str,
- range_t, range_ptr->count_in_range,
+ range_t, range_ptr->count_in_range,
range_ptr->percentage,
range_ptr->cumulative_percentage,
srv_str.srv_total, range_ptr->percent_in_range,
snprintf(tmp_total, sizeof(tmp_total), "%s",
ls3_stats_fmt_size_units(1024 *
- range_ptr->total_in_range));
+ range_ptr->total_in_range));
snprintf(tmp_min, sizeof(tmp_min), "%s",
- ls3_stats_fmt_size_units(1024 *
- range_ptr->rrt_min));
+ ls3_stats_fmt_size_units(1024 *
+ range_ptr->rrt_min));
snprintf(tmp_max, sizeof(tmp_max), "%s",
ls3_stats_fmt_size_units(1024 *
- range_ptr->rrt_max));
+ range_ptr->rrt_max));
ls3_stats_get_time_str(date_str,
sizeof(date_str),
if (i == LS3_STATS_TYPE_COMPRESSION_RATIO) {
/* total_weighted_sum - for calculating general
- * average value when using the ratio range */
+ * average value when using the ratio range */
double range_avg = (range_ptr->range_start +
range_ptr->range_end) / 2.0;
if (i == LS3_STATS_TYPE_COMPRESSION_RATIO)
report_ptr->rt_avg = total_weighted_sum /
- report_ptr->files_count;
+ report_ptr->files_count;
else
/* By default */
report_ptr->rt_avg = report_ptr->total_value /
- report_ptr->files_count;
+ report_ptr->files_count;
}
}
*
* @param user_id The user ID to search for.
* @return Pointer to the ls3_stats_user_report_template data if found,
- * otherwise NULL.
+ * otherwise NULL.
*/
static struct ls3_stats_user_report_template
*ls3_stats_find_user_reports(uint64_t user_id)
user_ptr = reports_with_stats->users_reports[i];
if (user_ptr == NULL && i != 0)
LS3_FATAL("Unable to access the user %lu report data\n",
- user_id);
+ user_id);
else if (user_ptr == NULL && i == 0)
return NULL; /* When first file */
if (allocate_file_size == 0)
return 0;
- if (loa_all->loa_size != 0 && allocate_file_size == loa_all->loa_size)
+ if (loa_all->loa_size != 0 &&
+ allocate_file_size >= loa_all->loa_size - 4096 &&
+ allocate_file_size <= loa_all->loa_size + 4096)
ls3_stats_update_range(LS3_STATS_TYPE_EQUAL_OVERHEAD,
allocate_file_size, LS3_STATS_EMPTY_VALUE);