MCPcopy Create free account
hub / github.com/PowerGridModel/power-grid-model / to_string

Function to_string

tests/benchmark_cpp/benchmark.cpp:24–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24constexpr std::string to_string(LogEvent tag) {
25 using enum LogEvent;
26 using namespace std::string_literals;
27
28 switch (tag) {
29 case total:
30 return "Total"s;
31 case build_model:
32 return "Build model"s;
33 case total_single_calculation_in_thread:
34 return "Total single calculation in thread"s;
35 case total_batch_calculation_in_thread:
36 return "Total batch calculation in thread"s;
37 case copy_model:
38 return "Copy model"s;
39 case update_model:
40 return "Update model"s;
41 case restore_model:
42 return "Restore model"s;
43 case scenario_exception:
44 return "Scenario exception"s;
45 case recover_from_bad:
46 return "Recover from bad"s;
47 case prepare:
48 return "Prepare"s;
49 case create_math_solver:
50 return "Create math solver"s;
51 case math_calculation:
52 return "Math Calculation"s; // TODO(mgovers): make capitalization consistent
53 case math_solver:
54 return "Math solver"s;
55 case initialize_calculation:
56 return "Initialize calculation"s;
57 case preprocess_measured_value:
58 return "Pre-process measured value"s; // TODO(mgovers): make plural
59 case prepare_matrix:
60 return "Prepare matrix"s;
61 case prepare_matrix_including_prefactorization:
62 return "Prepare matrix, including pre-factorization"s;
63 case prepare_matrices:
64 return "Prepare the matrices"s; // TODO(mgovers): combine or properly split up?
65 case initialize_voltages:
66 return "Initialize voltages"s;
67 case calculate_rhs:
68 return "Calculate rhs"s; // TODO(mgovers): capitalize?
69 case prepare_lhs_rhs:
70 return "Prepare LHS rhs"s;
71 case solve_sparse_linear_equation:
72 return "Solve sparse linear equation"s;
73 case solve_sparse_linear_equation_prefactorized:
74 return "Solve sparse linear equation (pre-factorized)"s;
75 case iterate_unknown:
76 return "Iterate unknown"s;
77 case calculate_math_result:
78 return "Calculate math result"s;
79 case produce_output:
80 return "Produce output"s;
81 case iterative_pf_solver_max_num_iter:

Callers 7

pack_arrayMethod · 0.85
pack_mapMethod · 0.85
logMethod · 0.85
make_keyFunction · 0.85
child_logger_helperFunction · 0.85
get_as_stringFunction · 0.85

Calls

no outgoing calls

Tested by 2

child_logger_helperFunction · 0.68
get_as_stringFunction · 0.68