Chi-Tech
sweepscheduler_sweep.cc
Go to the documentation of this file.
1#include "sweepscheduler.h"
2
3#include "chi_runtime.h"
4#include "chi_log.h"
5
6//###################################################################
7/**This is the entry point for sweeping.*/
9 Sweep()
10{
15}
16
17//###################################################################
18/**Get average sweep time from logging system.*/
20{
21 return Chi::log.ProcessEvent(sweep_event_tag_,
23}
24
25//###################################################################
26/**Get relevant sweep timing information.
27 *
28 * [0] Total sweep time
29 * [1] Total chunk time
30 * [2] Total chunk time / total sweep time
31 * */
32std::vector<double>
34{
35 std::vector<double> info;
36
37 double total_sweep_time = Chi::log.ProcessEvent(
39
40 double total_chunk_time =
42 sweep_timing_events_tag_[0], chi::ChiLog::EventOperation::TOTAL_DURATION);
43
44 double ratio_sweep_to_chunk = total_chunk_time/total_sweep_time;
45
46 info.push_back(total_sweep_time);
47 info.push_back(total_chunk_time);
48 info.push_back(ratio_sweep_to_chunk);
49
50 return info;
51}
static chi::ChiLog & log
Definition: chi_runtime.h:81
double ProcessEvent(size_t ev_tag, EventOperation ev_operation)
Definition: chi_log.cc:275
@ TOTAL_DURATION
Integrates times between begins and ends.
@ AVERAGE_DURATION
Computes average time between begins and ends.
void ScheduleAlgoFIFO(SweepChunk &sweep_chunk)
void ScheduleAlgoDOG(SweepChunk &sweep_chunk)