Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
This commit is contained in:

committed by
GitHub

parent
f88ac83408
commit
c8779fb311
@@ -18,6 +18,7 @@
|
||||
#include "rail_gui.h"
|
||||
#include "linkgraph/linkgraph.h"
|
||||
#include "saveload/saveload.h"
|
||||
#include "newgrf_profiling.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -245,6 +246,10 @@ static void OnNewMonth()
|
||||
*/
|
||||
static void OnNewDay()
|
||||
{
|
||||
if (!_newgrf_profilers.empty() && _newgrf_profile_end_date <= _date) {
|
||||
NewGRFProfiler::FinishAll();
|
||||
}
|
||||
|
||||
if (_network_server) NetworkServerDailyLoop();
|
||||
|
||||
DisasterDailyLoop();
|
||||
|
Reference in New Issue
Block a user