-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add benchsimulate command #10700
Add benchsimulate command #10700
Conversation
8722d80
to
b6a5fed
Compare
Is there a way to annotate/tag a certain event during the profiling? The UpdateLogic function has like a bunch of sub-updates and it would be nice to know which one of them performs terrible, heres a list:
There are quite a few, so it would be nice to know what is what. |
I see two ways to provide this:
|
This is essentially doing the same thing as #10281. We need to decide which to merge. |
48b653c
to
c1f7de0
Compare
adf35f5
to
69fbe50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking very neat
state.counters["NetworkUpdateAcc_ms"] = accumulator(LogicTimePart::NetworkUpdate); | ||
state.counters["DateAcc_ms"] = accumulator(LogicTimePart::Date); | ||
state.counters["ScenarioAcc_ms"] = accumulator(LogicTimePart::Scenario); | ||
state.counters["ClimateAcc_ms"] = accumulator(LogicTimePart::Climate); | ||
state.counters["MapTilesAcc_ms"] = accumulator(LogicTimePart::MapTiles); | ||
state.counters["MapStashProvisionalElementsAcc_ms"] = accumulator(LogicTimePart::MapStashProvisionalElements); | ||
state.counters["MapPathWideFlagsAcc_ms"] = accumulator(LogicTimePart::MapPathWideFlags); | ||
state.counters["PeepAcc_ms"] = accumulator(LogicTimePart::Peep); | ||
state.counters["MapRestoreProvisionalElementsAcc_ms"] = accumulator(LogicTimePart::MapRestoreProvisionalElements); | ||
state.counters["VehicleAcc_ms"] = accumulator(LogicTimePart::Vehicle); | ||
state.counters["MiscAcc_ms"] = accumulator(LogicTimePart::Misc); | ||
state.counters["RideAcc_ms"] = accumulator(LogicTimePart::Ride); | ||
state.counters["ParkAcc_ms"] = accumulator(LogicTimePart::Park); | ||
state.counters["ResearchAcc_ms"] = accumulator(LogicTimePart::Research); | ||
state.counters["RideRatingsAcc_ms"] = accumulator(LogicTimePart::RideRatings); | ||
state.counters["RideMeasurmentsAcc_ms"] = accumulator(LogicTimePart::RideMeasurments); | ||
state.counters["NewsAcc_ms"] = accumulator(LogicTimePart::News); | ||
state.counters["MapAnimationAcc_ms"] = accumulator(LogicTimePart::MapAnimation); | ||
state.counters["SoundsAcc_ms"] = accumulator(LogicTimePart::Sounds); | ||
state.counters["GameActionsAcc_ms"] = accumulator(LogicTimePart::GameActions); | ||
state.counters["NetworkFlushAcc_ms"] = accumulator(LogicTimePart::NetworkFlush); | ||
state.counters["ScriptsAcc_ms"] = accumulator(LogicTimePart::Scripts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have something that converts from an enum of LogicTimePart
into the corresponding string, to be less error prone. That would also allows us to do a for on the enum updating all counters
for (<all_enums>)
state.counters[ToLogicPartString(enum)] = accumulator(enum);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've dropped the issues where you commented, but there are still a few to tackle.
Adds a new command, `benchsimulate`, that starts benchmarking UpdateLogic() function.
69fbe50
to
deebd77
Compare
I've just updated, think it should be ready now |
Adds a new command,
benchsimulate
, that starts benchmarkingUpdateLogic() function.