matsim-vsp / parallel_qsim_rust

Parallel and distributed implementation of the Qsim in Rust
8 stars 0 forks source link

Performance profiling #70

Closed paulheinr closed 1 year ago

paulheinr commented 1 year ago

This PR adds performance profiling to the simulation. Each function of which the duration should be measured and logged is passed to measure_duration in src/simulation/performance_profiling/performance_proto.rs. This function starts a timer before executing the function. Each measurement produces a ProfilingEvent, which consists of

It will be protobuf encoded (Vec<u8>) and then base64 encoded (String). The base64 string is printed as attribute to the trace log. Each process stores it's trace in a separate file.

The performance log then has entries like the following one:

{"timestamp":"2023-04-17T18:42:40.086563Z","level":"TRACE","fields":{"event":"CgpzaW11bGF0aW9uEQQ5/eBJMf8/IgsaCQgTEAEYASIBAQ"},"target":"rust_q_sim::simulation::performance_profiling::performance_proto"}
paulheinr commented 1 year ago

Splittet in #88 and #89. Thus closed.