From a9e2749f6654d0aa07b274a45c9177d10323f80a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 6 Oct 2026 22:23:20 +0900 Subject: internal/testsuite: move from test This structure is a lot less clumsy than the old nix-centric layout. Signed-off-by: Ophestra --- internal/testsuite/proc_test.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 internal/testsuite/proc_test.go (limited to 'internal/testsuite/proc_test.go') diff --git a/internal/testsuite/proc_test.go b/internal/testsuite/proc_test.go new file mode 100644 index 00000000..73693972 --- /dev/null +++ b/internal/testsuite/proc_test.go @@ -0,0 +1,33 @@ +package testsuite_test + +import ( + "testing" + + "hakurei.app/internal/testsuite" +) + +func BenchmarkStatScanner(b *testing.B) { + var s testsuite.StatScanner + + for b.Loop() { + if !s.Scan() { + b.Fatal(s.Err()) + } + } +} + +func BenchmarkStatScannerFull(b *testing.B) { + var s testsuite.StatScanner + + for b.Loop() { + for s.Scan() { + if s.Repopulated() { + break + } + } + + if err := s.Err(); err != nil { + b.Fatal(err) + } + } +} -- cgit v1.3.1