| 73 | } |
| 74 | |
| 75 | int main(int argc, char *argv[]) { |
| 76 | reader_init_param_t init_params = default_reader_init_params(); |
| 77 | /* the first column is the time, the second is the object id, the third is the |
| 78 | * object size */ |
| 79 | init_params.time_field = 2; |
| 80 | init_params.obj_id_field = 5; |
| 81 | init_params.obj_size_field = 4; |
| 82 | |
| 83 | /* the trace has a header */ |
| 84 | init_params.has_header = true; |
| 85 | init_params.has_header_set = true; |
| 86 | |
| 87 | /* the trace uses comma as the delimiter */ |
| 88 | init_params.delimiter = ','; |
| 89 | |
| 90 | /* object id in the trace is numeric */ |
| 91 | init_params.obj_id_is_num = true; |
| 92 | |
| 93 | reader_t *reader = open_trace(TRACE_PATH, CSV_TRACE, &init_params); |
| 94 | |
| 95 | common_cache_params_t cc_params = default_common_cache_params(); |
| 96 | cc_params.cache_size = 1 * GiB; // any size should work |
| 97 | cache_t *cache = LRU_init(cc_params, nullptr); |
| 98 | |
| 99 | printf("==== run one cache at different sizes ====\n"); |
| 100 | run_one_cache_multiple_sizes(cache, reader); |
| 101 | |
| 102 | /* a different example of concurrent simulations */ |
| 103 | printf("==== run multiple caches ====\n"); |
| 104 | run_multiple_caches(reader); |
| 105 | |
| 106 | close_trace(reader); |
| 107 | } |
nothing calls this directly
no test coverage detected