2#include "Framework/Performance/Callback.h"
4#include "Framework/Exception/Exception.h"
6namespace framework::performance {
8std::string to_name(Callback c) {
10 case Callback::onProcessStart:
11 return "onProcessStart";
12 case Callback::onProcessEnd:
13 return "onProcessEnd";
14 case Callback::onFileOpen:
16 case Callback::onFileClose:
18 case Callback::beforeNewRun:
19 return "beforeNewRun";
20 case Callback::onNewRun:
22 case Callback::process:
27 "Somehow we got a Callback enum (value: " + std::to_string(to_index(c)) +
28 ") that doesn't match one of the listed possibilities\n"
29 "Did a new Callback get added to the performance tracker and the "
30 "to_name function wasn't updated?");