17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 19:47:30 +01:00

perf(physics): the steps of the vehicle physics on many threads, in groups of vehicles which act on one another (performance.cpucores, 0: all cores)

This commit is contained in:
2026-10-23 19:56:36 +02:00
parent 2f96dfe767
commit 60667588b5
11 changed files with 403 additions and 4 deletions

View File

@@ -861,6 +861,13 @@ void opengl46_renderer::SwapBuffers()
auto text { std::to_string( Value ) };
return std::string( std::max<int>( 0, 6 - static_cast<int>( text.size() ) ), ' ' ) + text; };
auto const nearlimit { std::to_string( static_cast<int>( Timer::subsystem.VEHICLE_NEAR ) ) + " m" };
text += timeline(
3,
( counts.threads > 1 ?
"steps on " + std::to_string( counts.threads ) + " threads: " + std::to_string( counts.groups ) + " groups, largest "
+ std::to_string( counts.largestgroup ) + ", " + std::to_string( counts.maingroups ) + " in the main thread (forces by kind not timed)" :
std::string{ "steps on 1 thread" } ),
"" );
char const *const kindnames[] = { "rail, within ", "rail, farther", "road, within ", "road, farther" };
text += timeline( 3, "by kind (near: " + nearlimit + ")", " count stand forces update" );
for( std::size_t kind = 0; kind < 4; ++kind ) {