From df3ea75ca91ade042af12db5b01b9f824936a32f Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 20 Sep 2023 04:56:08 +0400 Subject: [PATCH] Added a benchmark for ScanDirectory(). --- pkg/files/files_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/files/files_test.go diff --git a/pkg/files/files_test.go b/pkg/files/files_test.go new file mode 100644 index 0000000..1a094dd --- /dev/null +++ b/pkg/files/files_test.go @@ -0,0 +1,13 @@ +package files + +import "testing" + +const path = "/mnt/data/music/Various" +const urlBase = "/srv/ftp/" + +func BenchmarkScanDirectory(b *testing.B) { + for i := 0; i < b.N; i++ { + /*e, _, _ :=*/ ScanDirectory(path, urlBase) + // b.Log(e[len(e)-1], len(e)) + } +}