From 32c39122164b62016481753ec43304ef98e0de30 Mon Sep 17 00:00:00 2001 From: abeaucha Date: Thu, 3 Oct 2024 13:25:52 -0400 Subject: [PATCH] clang-format --- six/modules/c++/six/include/six/Utilities.h | 41 ++++++++++++--------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/six/modules/c++/six/include/six/Utilities.h b/six/modules/c++/six/include/six/Utilities.h index c54841334..1453bac61 100644 --- a/six/modules/c++/six/include/six/Utilities.h +++ b/six/modules/c++/six/include/six/Utilities.h @@ -389,17 +389,13 @@ namespace testing struct SIX_SIX_API BaseEnvProfiler { BaseEnvProfiler(const char* envVar, - const std::string& testName, - std::ostream &stream) - : mEnvVar(envVar), - mTestName(testName), - mStream(stream) + const std::string& testName, + std::ostream& stream) : + mEnvVar(envVar), mTestName(testName), mStream(stream) { sys::OS os; mEnabled = os.isEnvSet(mEnvVar); - mNumIters = mEnabled - ? str::toType(os.getEnv(mEnvVar)) - : 1; + mNumIters = mEnabled ? str::toType(os.getEnv(mEnvVar)) : 1; } ~BaseEnvProfiler() = default; @@ -427,9 +423,11 @@ namespace testing struct SIX_SIX_API EnvProfiler : BaseEnvProfiler { EnvProfiler(const char* envVar, - const std::string& testName, - std::ostream &stream) : BaseEnvProfiler(envVar, testName, stream) - {} + const std::string& testName, + std::ostream& stream) : + BaseEnvProfiler(envVar, testName, stream) + { + } ~EnvProfiler() = default; template @@ -453,20 +451,25 @@ namespace testing } mean /= mNumIters; - mStream << mTestName << " runtime (mean/min/max)ms: " - << mean << "/" << mn << "/" << mx << std::endl; + mStream << mTestName << " runtime (mean/min/max)ms: " << mean << "/" + << mn << "/" << mx << std::endl; } }; /// @brief Toggle profiling of exception sizes based on env var /// @tparam TExcept template - struct SIX_SIX_API StackTraceSizeEnvProfiler : BaseEnvProfiler> + struct SIX_SIX_API StackTraceSizeEnvProfiler + : BaseEnvProfiler> { StackTraceSizeEnvProfiler(const char* envVar, - const std::string& testName, - std::ostream &stream) : BaseEnvProfiler>(envVar, testName, stream) - {} + const std::string& testName, + std::ostream& stream) : + BaseEnvProfiler>(envVar, + testName, + stream) + { + } ~StackTraceSizeEnvProfiler() = default; template @@ -479,7 +482,9 @@ namespace testing catch (const TExcept& ex) { // log size of the exception message - this->mStream << this->mTestName << ": exception size (bytes): " << strlen(ex.what()) << std::endl; + this->mStream << this->mTestName + << ": exception size (bytes): " << strlen(ex.what()) + << std::endl; throw; }