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 clearcolor benchmark and some options for textrendering #698

Closed
wants to merge 1 commit into from

Conversation

necropotame
Copy link
Contributor

@necropotame necropotame commented Mar 21, 2017

  • benchmark_clearcolor is needed to know the FPS upper bound that textrendering can reach
  • textrendring can use different set of text: ascii, monofont (the old one) and cjk

 * benchmark_clearcolor is needed to know the FPS upper bound that textrendering can reach
 * textrendring can use different set of text: ascii, monofont (the old one) and cjk
@necropotame necropotame changed the title Pr benchmark Add clearcolor benchmark and some options for textrendering Mar 21, 2017
Copy link
Member

@heinrich5991 heinrich5991 left a comment

Choose a reason for hiding this comment

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

Thanks for your benchmarking efforts. :)

I think it would be more useful if we'd treat the first frame special, all the loading happens in that frame, so I wouldn't count it for the FPS and for the 1st-10th longest frame.

I also posted some other minor comments.

Sorry it took so long, I basically still don't have time to review this. :D

@@ -309,6 +309,20 @@ if(CLIENT)
target_sources(${TARGET_CLIENT} PRIVATE "other/icons/DDNet.rc")
endif()

# Benchmark for clear color
set(TARGET_BM_CLEARCOLOR benchmark_clearcolor)
Copy link
Member

Choose a reason for hiding this comment

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

I didn't really know what "clear color" was when I first looked at it. Maybe call it something like "benchmark_empty"?

else if(str_comp(argv[i], "--test") == 0 || str_comp(argv[i], "-t") == 0)
{
if(Test != TEST_DEFAULT)
continue;
Copy link
Member

Choose a reason for hiding this comment

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

Weird behavior on double-passing --test, but doesn't matter.

dbg_msg("benchmark", "%slongest frame: %.2fms", aPrefix, Time);
case TEST_DEFAULT:
case TEST_MONOFONT:
return ExecTest(s_aaMonofont, sizeof(s_aaMonofont) / sizeof(TestString));
Copy link
Member

Choose a reason for hiding this comment

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

/ sizeof(s_aaMonofont[0]) works even if the underlying type changes.

// check end of analyse
{
int64 AnalyseDuration = m_CurrentTime - m_StartTime;
if(AnalyseDuration > time_freq() * m_Duration)
Copy link
Member

Choose a reason for hiding this comment

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

Comment and the variable name: It's "analysis". English is a weird language...

void PrintReport()
{
double Time = (m_CurrentTime - m_StartTime) / (double)time_freq();
double Fps = (double)(m_FrameCounter - 1) / Time;
Copy link
Member

Choose a reason for hiding this comment

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

I think the - 1 is only sensible if you don't count the time of the first frame.

@necropotame
Copy link
Contributor Author

Thanks, I will fix all of that :) No problem for the time, we are all volunteers ;)

@def- def- closed this May 14, 2017
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.

3 participants