From aa6d8d7b5648888b9bd99fc04a0def69c05bd5d2 Mon Sep 17 00:00:00 2001 From: gmega Date: Fri, 3 Nov 2023 16:09:39 -0300 Subject: [PATCH] fix test file name and remove old test file --- .../utils/asyncprofiler/testserialization.nim | 2 +- tests/codex/utils/asyncprofiler/testutils.nim | 60 ------------------- 2 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 tests/codex/utils/asyncprofiler/testutils.nim diff --git a/tests/codex/utils/asyncprofiler/testserialization.nim b/tests/codex/utils/asyncprofiler/testserialization.nim index 7e412f28..0299c296 100644 --- a/tests/codex/utils/asyncprofiler/testserialization.nim +++ b/tests/codex/utils/asyncprofiler/testserialization.nim @@ -7,7 +7,7 @@ import codex/utils/asyncprofiler import ../../helpers -checksuite "asyncprofiler utils": +checksuite "asyncprofiler metrics serializer": var fooLoc = SrcLoc( procedure: "foo", diff --git a/tests/codex/utils/asyncprofiler/testutils.nim b/tests/codex/utils/asyncprofiler/testutils.nim deleted file mode 100644 index a2ee5c28..00000000 --- a/tests/codex/utils/asyncprofiler/testutils.nim +++ /dev/null @@ -1,60 +0,0 @@ -import std/tables -import std/unittest -import std/json - -import codex/utils/asyncprofiler - -import ../../helpers - -checksuite "asyncprofiler utils": - - var fooLoc = SrcLoc( - procedure: "foo", - file: "foo.nim", - line: 1 - ) - - let metric = CallbackMetric( - totalExecTime: 2.seconds, - totalRunTime: 2.seconds, - totalWallTime: 2.seconds, - minSingleTime: 100.nanoseconds, - maxSingleTime: 1500.milliseconds, - count: 10 - ) - - test "should serialize CallbackMetrics": - check %metric == %*{ - "totalExecTime": 2000000000, - "totalRunTime": 2000000000, - "totalWallTime": 2000000000, - "minSingleTime": 100, - "maxSingleTime":1500000000, - "count": 10 - } - - test "should serialize SrcLoc": - check %fooLoc == %*{ - "procedure": "foo", - "file": "foo.nim", - "line": 1 - } - - test "should serialize MetricsSummary": - var summary: MetricsSummary = { - (addr fooLoc): metric - }.toTable - - check %summary == [%*{ - "location": %*{ - "procedure": "foo", - "file": "foo.nim", - "line": 1, - }, - "totalExecTime": 2000000000, - "totalRunTime": 2000000000, - "totalWallTime": 2000000000, - "minSingleTime": 100, - "maxSingleTime":1500000000, - "count": 10 - }]