7 #ifndef CCTOOLS_CATEGORY_H
8 #define CCTOOLS_CATEGORY_H
15 CATEGORY_ALLOCATION_FIRST = 0,
16 CATEGORY_ALLOCATION_AUTO = 0,
17 CATEGORY_ALLOCATION_MAX,
18 CATEGORY_ALLOCATION_ERROR
19 } category_allocation_t;
30 WORK_QUEUE_ALLOCATION_MODE_FIXED = 0,
31 WORK_QUEUE_ALLOCATION_MODE_MAX,
39 WORK_QUEUE_ALLOCATION_MODE_MIN_WASTE,
41 WORK_QUEUE_ALLOCATION_MODE_MAX_THROUGHPUT
44 #define CATEGORY_ALLOCATION_MODE_FIXED WORK_QUEUE_ALLOCATION_MODE_FIXED
45 #define CATEGORY_ALLOCATION_MODE_MAX WORK_QUEUE_ALLOCATION_MODE_MAX
46 #define CATEGORY_ALLOCATION_MODE_MIN_WASTE WORK_QUEUE_ALLOCATION_MODE_MIN_WASTE
47 #define CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT WORK_QUEUE_ALLOCATION_MODE_MAX_THROUGHPUT
51 category_mode_t allocation_mode;
62 struct histogram *cores_histogram;
63 struct histogram *cores_avg_histogram;
64 struct histogram *wall_time_histogram;
65 struct histogram *cpu_time_histogram;
66 struct histogram *max_concurrent_processes_histogram;
67 struct histogram *total_processes_histogram;
68 struct histogram *memory_histogram;
69 struct histogram *swap_memory_histogram;
70 struct histogram *virtual_memory_histogram;
71 struct histogram *bytes_read_histogram;
72 struct histogram *bytes_written_histogram;
73 struct histogram *bytes_received_histogram;
74 struct histogram *bytes_sent_histogram;
75 struct histogram *bandwidth_histogram;
76 struct histogram *total_files_histogram;
77 struct histogram *disk_histogram;
82 int time_peak_independece;
85 int64_t completions_since_last_reset;
92 uint64_t average_task_time;
97 struct hash_table *mf_variables;
101 void category_specify_allocation_mode(
struct category *c,
int mode);
103 int category_enable_auto_resource(
struct category *c,
const char *resource_name,
int autolabel);
105 void category_specify_max_allocation(
struct category *c,
const struct rmsummary *s);
106 void category_specify_first_allocation_guess(
struct category *c,
const struct rmsummary *s);
108 struct category *category_create(
const char *name);
109 struct category *category_lookup_or_create(
struct hash_table *categories,
const char *name);
110 void category_delete(
struct hash_table *categories,
const char *name);
111 void categories_initialize(
struct hash_table *categories,
struct rmsummary *top,
const char *summaries_file);
114 int category_update_first_allocation(
struct category *c,
const struct rmsummary *max_worker);
116 int category_in_steady_state(
struct category *c);
118 category_allocation_t category_next_label(
struct category *c, category_allocation_t current_label,
int resource_overflow,
struct rmsummary *user,
struct rmsummary *measured);
120 const struct rmsummary *category_dynamic_task_max_resources(
struct category *c,
struct rmsummary *user, category_allocation_t request);
122 const struct rmsummary *category_dynamic_task_min_resources(
struct category *c,
struct rmsummary *user, category_allocation_t request);
Portable routines for high resolution timing.
Statistics describing a work queue.
Definition: work_queue.h:188
Definition: rmsummary.h:27
A general purpose hash table.
Keep counts of doubles that fall in some given bucket size.
Definition: category.h:49