MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / GetShowStatsEnvVar

Function GetShowStatsEnvVar

layers/sync/sync_validation.cpp:36–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace syncval {
35
36static bool GetShowStatsEnvVar() {
37 // Set environment variable as non zero number to enable stats reporting
38 const auto show_stats_str = GetEnvironment("VK_SYNCVAL_SHOW_STATS");
39 return !show_stats_str.empty() && std::atoi(show_stats_str.c_str()) != 0;
40}
41
42SyncValidator::SyncValidator(vvl::DispatchDevice* dev, syncval::Instance* instance_vo)
43 : BaseClass(dev, instance_vo, LayerObjectTypeSyncValidation), error_messages_(*this), report_stats_(GetShowStatsEnvVar()) {}

Callers 1

SyncValidatorMethod · 0.85

Calls 3

GetEnvironmentFunction · 0.85
c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected