-
Notifications
You must be signed in to change notification settings - Fork 404
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
Conversation
necropotame
commented
Mar 21, 2017
•
edited
Loading
edited
- 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
There was a problem hiding this 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) |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
Thanks, I will fix all of that :) No problem for the time, we are all volunteers ;) |