Skip to content

Commit 7441bdb

Browse files
committed
Clarify some of the new included functions
1 parent 4ed4cf1 commit 7441bdb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/dag_benchmarks.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,16 @@ struct tdag_benchmark_context : dag_benchmark_context, private task_manager::del
131131

132132
void task_created(const task* tsk) override { m_tasks.push_back(tsk); }
133133

134+
// is called before the initialization of benchmark tasks
134135
void initialize() { tm.generate_epoch_task(celerity::detail::epoch_action::init); }
135136

137+
// is called after the initialization of benchmark tasks
136138
void prepare() { m_tasks.reserve(m_command_groups.size()); }
137139

140+
// executes everything that is actually benchmarked (measured)
138141
void execute() { create_all_tasks(); }
139142

143+
// finalizes the benchmark context, e.g. generates shutdown epoch, and clears the command groups
140144
void finalize() {
141145
tm.generate_epoch_task(celerity::detail::epoch_action::shutdown);
142146
m_command_groups.clear();
@@ -162,7 +166,7 @@ struct cdag_benchmark_context : tdag_benchmark_context {
162166

163167
void initialize() {
164168
tdag_benchmark_context::initialize();
165-
create_all_commands();
169+
create_all_commands(); // used to initialize the m_command_batches even if empty
166170
m_tasks.clear();
167171
}
168172

@@ -203,7 +207,7 @@ struct idag_benchmark_context : cdag_benchmark_context {
203207

204208
void initialize() {
205209
cdag_benchmark_context::initialize();
206-
create_all_instructions();
210+
create_all_instructions(); // used to initialize the m_command_batches even if empty
207211
m_command_batches.clear();
208212
}
209213

0 commit comments

Comments
 (0)