Skip to content

Conversation

@nezuo
Copy link
Contributor

@nezuo nezuo commented Nov 27, 2025

Feel free to suggest alternative names for the option.

Here are the places labels were added:

  • For callbacks:
local function profiledCallback(label, callback)
	return function(...)
		debug.profilebegin(label)
		callback(...)
		debug.profileend()
	end
end

setCallback = function(callback: (message: (string)) -> ())
    callback = profiledCallback("EventName Callback", callback)
  • When events/functions are fired/called: EventName Fire/EventName FireAll/FunctionName Call
  • In OnClientEvents/OnServerEvents: Zap Reliable OnClientEvent/Zap UnreliableEventName OnClientEvent
  • A label for each event/functions's deserialization: EventName Deserialize
  • A label for sendEvents(): Zap Send Events

Copy link
Collaborator

@sasial-dev sasial-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add tests? They'll point out an issue I noticed as to where you're setting a global variable for example.

Image

@nezuo
Copy link
Contributor Author

nezuo commented Nov 28, 2025

Didn't realize we had tests, I'll take a look.

@nezuo
Copy link
Contributor Author

nezuo commented Nov 29, 2025

Callbacks are no longer wrapped in profiledCallback and now there are just profiles around them wherever they are called.

I also added the display_path methods to FnDecl and EvDecl so we can show Namespace.Event instead of just Event.

Copy link
Collaborator

@sasial-dev sasial-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sasial-dev sasial-dev merged commit 96ab938 into red-blox:0.6.x Dec 1, 2025
2 checks passed
@nezuo nezuo deleted the include-profile-labels branch December 1, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants