Skip to content
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

A new feature "Custom counters" #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kripergvg
Copy link

@kripergvg kripergvg commented Mar 1, 2022

Right now the only numeric data that gets visualized as a chart is a scope duration ("Function Chart" panel). During a game profiling session there are usually a lot of other numeric data that would benefit from being visualizated as graphic charts. I implemented "Custom counters". It's a way to draw charts based on custom data.

Example:

void Engine::UpdateMessages()
{
	OPTICK_CATEGORY("UpdateMessages", Optick::Category::Network);
	SlowFunction<REPEAT_COUNT>();

	float_t messageCount = (float_t)(rand() % 10000);
	OPTICK_COUNTER("Network/Message count", messageCount);

	float_t trianglesCount= (float_t)(rand() % 10000);
	OPTICK_COUNTER("Render/Triangles Count", trianglesCount);
}

It gets visualized like this

image

In addition there is a way to group up different counters by creating different counter panels and you can have different counter layouts for different situations using "Save As"/"Load:"
image

Current limitations: counter name should be unique

Color Picker widget that I use for an ability to select different colors for different counters. If you prefer I can replace the nuget package with source code.

@kripergvg kripergvg changed the title A new feature "Custom counters" WIP A new feature "Custom counters" Mar 2, 2022
@kripergvg kripergvg changed the title WIP A new feature "Custom counters" A new feature "Custom counters" Mar 2, 2022
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.

1 participant