Skip to content

Commit

Permalink
Display functions that were previously forgotten in Profiler
Browse files Browse the repository at this point in the history
The array data in `add()` contains these data, but some data may
have been forgotten to be converted into `ServerFunctionInfo`.

This results in some information not being displayed in the Profiler.
  • Loading branch information
Rindbee committed Jan 4, 2024
1 parent d822fd5 commit 3d3c4e8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions servers/debugger/servers_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ class ServersDebugger::ServersProfiler : public EngineProfiler {
}
ServerInfo &srv = server_data[name];

ServerFunctionInfo fi;
fi.name = p_data[1];
fi.time = p_data[2];
srv.functions.push_back(fi);
for (int idx = 1; idx < p_data.size() - 1; idx += 2) {
ServerFunctionInfo fi;
fi.name = p_data[idx];
fi.time = p_data[idx + 1];
srv.functions.push_back(fi);
}
}

void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) {
Expand Down

0 comments on commit 3d3c4e8

Please sign in to comment.