-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(core/profiler): add natives exposing start/stop recording #2486
Open
AvarianKnight
wants to merge
1
commit into
citizenfx:master
Choose a base branch
from
AvarianKnight:feat/profiler-natives
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(core/profiler): add natives exposing start/stop recording #2486
AvarianKnight
wants to merge
1
commit into
citizenfx:master
from
AvarianKnight:feat/profiler-natives
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
triage
Needs a preliminary assessment to determine the urgency and required action
label
Apr 25, 2024
github-actions
bot
added
invalid
Requires changes before it's considered valid and can be (re)triaged
and removed
triage
Needs a preliminary assessment to determine the urgency and required action
labels
Sep 29, 2024
AvarianKnight
force-pushed
the
feat/profiler-natives
branch
from
September 29, 2024 04:20
f61cf2f
to
d7b5877
Compare
FabianTerhorst
added
enhancement
Feature or other request that adds functionality or improved usability
and removed
invalid
Requires changes before it's considered valid and can be (re)triaged
labels
Sep 30, 2024
AvarianKnight
force-pushed
the
feat/profiler-natives
branch
from
October 2, 2024 16:58
d7b5877
to
838d9d0
Compare
github-actions
bot
added
the
triage
Needs a preliminary assessment to determine the urgency and required action
label
Oct 2, 2024
AvarianKnight
force-pushed
the
feat/profiler-natives
branch
2 times, most recently
from
October 25, 2024 19:52
3dd0208
to
6dad489
Compare
github-actions
bot
added
invalid
Requires changes before it's considered valid and can be (re)triaged
and removed
triage
Needs a preliminary assessment to determine the urgency and required action
labels
Oct 25, 2024
Here's some test code. Note on the client you'll have to set CreateThread(function()
local profilerStarted = false
local profilerId = 0
while true do
if not profilerStarted then
profilerStarted = true
print("started")
ProfilerStartRecording(50)
elseif not ProfilerIsRecording() then
print("save")
profilerId = profilerId + 1
local jsonFile = ProfilerSaveToJson()
local msgPackFile = ProfilerSaveToMsgpack()
print("json", jsonFile)
print("msgpack", msgPackFile)
profilerStarted = false
end
Wait(0)
end
end)
|
- currently trying to do recordings can only be done via console commands, which can be tedious - adds `PROFILER_START_RECORDING` and `PROFILER_STOP_RECORDING` to allow automating profiler captures - adds `PROFILER_SAVE_TO_JSON` and `PROFILER_SAVE_TO_MSGPACK` to allow for automated saving of profiler recordings
AvarianKnight
force-pushed
the
feat/profiler-natives
branch
from
November 5, 2024 03:49
6dad489
to
a8b8968
Compare
The implementation has swapped from taking a string value as the file name, to defining one based on the current time of day to not allow the functions to be used maliciously. This also adds a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Feature or other request that adds functionality or improved usability
invalid
Requires changes before it's considered valid and can be (re)triaged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PROFILER_START_RECORDING
andPROFILER_STOP_RECORDING
to allow automating profiler capturesGoal of this PR
Allow resources to start/stop recording to allow for easier automation of testing performance of code
How is this PR achieving the goal
Exposes
PROFILER_START_RECORDING
andPROFILER_STOP_RECORDING
This PR applies to the following area(s)
Natives, SCRT
Successfully tested on
Platforms: Windows
Checklist