Sunday 1 April 2018

TrafficControl: Displaying System Load

I aadded an indicator of the system load, defined as the time needed for simulating one second.

The time is measured in networkControl::stepTimeForNetwork as the time used between start and end of that function. The system load is calculated by dividing the computation time by the interval time.

For each tick, the results are shown in a textLabel on the user interface.

When running on my system (i5-8250, 8 GB RAM), three trains, the load is:

  • Debug version, PC in battery saving mode, average 5 ms, occasionally up to 15 ms.
  • Debug version, PC in performance mode, average 2 ms.
  • Release version, PC in battery saving mode, average 2 ms
  • Release version, PC in  performance mode, average 3 ms

This means that there is room for bigger networks in the program

No comments:

Post a Comment