Add background thread related stats.

This commit is contained in:
Qi Wang
2017-05-12 12:30:33 -07:00
committed by Qi Wang
parent b693c7868e
commit 2bee0c6251
9 changed files with 214 additions and 21 deletions

View File

@@ -18,8 +18,19 @@ struct background_thread_info_s {
* background thread to wake up earlier.
*/
size_t npages_to_purge_new;
/* Stats: total number of runs since started. */
uint64_t tot_n_runs;
/* Stats: total sleep time since started. */
nstime_t tot_sleep_time;
#endif /* ifdef JEMALLOC_BACKGROUND_THREAD */
};
typedef struct background_thread_info_s background_thread_info_t;
struct background_thread_stats_s {
size_t num_threads;
uint64_t num_runs;
nstime_t run_interval;
};
typedef struct background_thread_stats_s background_thread_stats_t;
#endif /* JEMALLOC_INTERNAL_BACKGROUND_THREAD_STRUCTS_H */