[*] Update time test
[+] missing brotli sub-modules
This commit is contained in:
parent
2e88cebbad
commit
90becc2bb9
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -70,3 +70,6 @@
|
|||||||
[submodule "Aurora/ROXTL"]
|
[submodule "Aurora/ROXTL"]
|
||||||
path = Aurora/ROXTL
|
path = Aurora/ROXTL
|
||||||
url = https://gitea.reece.sx/AuroraSupport/auROXTL.git
|
url = https://gitea.reece.sx/AuroraSupport/auROXTL.git
|
||||||
|
[submodule "Vendor/brotli"]
|
||||||
|
path = Vendor/brotli
|
||||||
|
url = https://github.com/google/brotli
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 62c29d060062f4add0c5c4b59ccad5dde0c3d937
|
Subproject commit c787d854851bf3d11793d09d41a61e11f37d8a9e
|
@ -8,28 +8,47 @@
|
|||||||
#include <AuroraRuntime.hpp>
|
#include <AuroraRuntime.hpp>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
TEST(Benchmark, HighResClockMS)
|
TEST(A, A)
|
||||||
{
|
{
|
||||||
SysBenchmark("HighResClockMS");
|
AuLogDbg("Process time (ms): {}", AuTime::ProcessClockMS());
|
||||||
|
AuLogDbg("Thread time (ms): {}", AuTime::ThreadClockMS());
|
||||||
|
AuLogDbg("Wall Time (ms): {}", AuTime::CurrentClockMS());
|
||||||
|
|
||||||
|
AuTime::tm time = AuTime::ToCivilTime(AuTime::CurrentClockMS());
|
||||||
|
AuLogDbg("[UTC] The time is: hh::mm {:02}:{:02}", time.tm_hour, time.tm_min);
|
||||||
|
AuLogDbg("[UTC] The date/time is: {} (no milliseconds)", AuLocale::TimeDateToISO8601(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Benchmark, Steady)
|
||||||
|
{
|
||||||
|
SysBenchmark("SteadyClockNS");
|
||||||
|
|
||||||
AuUInt c {};
|
AuUInt c {};
|
||||||
for (int i = 0; i < 100'000'000; i++)
|
for (int i = 0; i < 100'000'000; i++)
|
||||||
{
|
{
|
||||||
c += AuTime::HighResClockMS();
|
c += AuTime::SteadyClockNS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Benchmark, CurrentClockMS)
|
TEST(Benchmark, CurrentClockNS)
|
||||||
{
|
{
|
||||||
SysBenchmark("CurrentClockMS");
|
SysBenchmark("CurrentClockNS");
|
||||||
|
|
||||||
AuUInt c {};
|
AuUInt c {};
|
||||||
for (int i = 0; i < 100'000'000; i++)
|
for (int i = 0; i < 100'000'000; i++)
|
||||||
{
|
{
|
||||||
c += AuTime::CurrentClockMS();
|
c += AuTime::CurrentClockNS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(CheckClockPresence, CheckClockPresence)
|
||||||
|
{
|
||||||
|
ASSERT_TRUE(bool(AuTime::GetClockFromEnum(AuTime::EClock::eProcessTime)));
|
||||||
|
ASSERT_TRUE(bool(AuTime::GetClockFromEnum(AuTime::EClock::eThreadTime)));
|
||||||
|
ASSERT_TRUE(bool(AuTime::GetClockFromEnum(AuTime::EClock::eWall)));
|
||||||
|
ASSERT_TRUE(bool(AuTime::GetClockFromEnum(AuTime::EClock::eSteady)));
|
||||||
|
}
|
||||||
|
|
||||||
void RunTests()
|
void RunTests()
|
||||||
{
|
{
|
||||||
Aurora::RuntimeStartInfo info;
|
Aurora::RuntimeStartInfo info;
|
||||||
|
1
Vendor/brotli
vendored
Submodule
1
Vendor/brotli
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit ed1995b6bda19244070ab5d331111f16f67c8054
|
Loading…
Reference in New Issue
Block a user