feature: Add elapsed time to debugger logs

Related-to: NEO-11469

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates
2024-05-20 17:33:59 +00:00
committed by Compute-Runtime-Automation
parent e5f9761baa
commit cb6e63ed05
4 changed files with 35 additions and 5 deletions

View File

@@ -12,6 +12,7 @@
#include "shared/source/utilities/logger.h"
#include "shared/test/common/debug_settings/debug_settings_manager_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/gtest_helpers.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_io_functions.h"
#include "shared/test/common/test_macros/test.h"
@@ -20,6 +21,7 @@
#include <cstdio>
#include <fstream>
#include <memory>
#include <regex>
#include <sstream>
#include <string>
@@ -440,3 +442,10 @@ TEST(DebugLog, WhenLogDebugStringCalledThenNothingIsPrintedToStdout) {
auto output = ::testing::internal::GetCapturedStdout();
EXPECT_EQ(0u, output.size());
}
TEST(DurationLogTest, givenDurationGetTimeStringThenTimeStringIsCorrect) {
auto timeString = DurationLog::getTimeString();
for (auto c : timeString) {
EXPECT_TRUE(std::isdigit(c));
}
}