Skip to content

Commit

Permalink
Allow setting benchmarking warmup time to 0 seconds to skip warmup ph…
Browse files Browse the repository at this point in the history
…ase (#1112)

Sometimes it's desired to render exactly N (--c N) frames.
  • Loading branch information
takayhan-AMD authored Mar 19, 2024
1 parent 5b792b0 commit 720afde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace vks
bool active = false;
bool outputFrameTimes = false;
int outputFrames = -1; // -1 means no frames limit
uint32_t warmup = 1;
uint32_t warmup = 1; // Default to 1 sec of warm-up
uint32_t duration = 10;
std::vector<double> frameTimes;
std::string filename = "";
Expand Down
2 changes: 1 addition & 1 deletion base/vulkanexamplebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ VulkanExampleBase::VulkanExampleBase()
vks::tools::errorModeSilent = true;
}
if (commandLineParser.isSet("benchmarkwarmup")) {
benchmark.warmup = commandLineParser.getValueAsInt("benchmarkwarmup", benchmark.warmup);
benchmark.warmup = commandLineParser.getValueAsInt("benchmarkwarmup", 0);
}
if (commandLineParser.isSet("benchmarkruntime")) {
benchmark.duration = commandLineParser.getValueAsInt("benchmarkruntime", benchmark.duration);
Expand Down

0 comments on commit 720afde

Please sign in to comment.