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

Add a performance counter that exports all data at the end and avoids… #93

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mhoffman219
Copy link
Contributor

… mallocs.

@pestophagous pestophagous force-pushed the mhoffman/performance_counter branch from e7da97a to 4825ba5 Compare April 25, 2022 23:37
@pestophagous pestophagous force-pushed the mhoffman/performance_counter branch from 4825ba5 to 67ccb84 Compare April 26, 2022 00:05
@@ -66,5 +71,15 @@ void ViewModelCollection::ExportContextPropertiesToQml( QQmlEngine* engine )
void ViewModelCollection::SetRootObject( QObject* object )
{
m_eventFilter->FilterEventsDirectedAtThisObject( object );

#if !defined( Q_OS_ANDROID )
if( m_opts->RunningGuiTests() )
Copy link
Member

Choose a reason for hiding this comment

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

@mhoffman219 Unless we end up discovering some way in which the GuiTest(s) are fundamentally in conflict with how the PerformanceCounter works, then I think this is a good spot to place some sample code (since it won't execute other than during tests).

I ran the gui tests and I observed that this code is executing, but I still didn't manage to get to a point where the PerformanceCounter would dump out its statistics in ReportRequest::ExportReport()

Hoping you can help me add code here that would result in some printing of stats, even if the numbers are extremely boring when running the GuiTest of this app.

Copy link
Member

Choose a reason for hiding this comment

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

Oh. And if you want to launch the app in GuiTest mode:

build/src/app/app -g

... and then additionally you might want to hack this 1 to make the app stay open longer so you can press buttons and cause more GUI activity before the app auto-closes. This line is where to hack:

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