From 5f6607152a96b85f1518028b8f1ee1ef1aefda75 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 23 Jan 2025 09:54:11 -0300 Subject: Move benchmarks from tests/stm.go to tests/benchmarks/* --- tests/benchmarks/int64-add64/main.go | 1 + tests/benchmarks/int64-add64/stm.go | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 120000 tests/benchmarks/int64-add64/main.go create mode 100644 tests/benchmarks/int64-add64/stm.go (limited to 'tests/benchmarks/int64-add64') diff --git a/tests/benchmarks/int64-add64/main.go b/tests/benchmarks/int64-add64/main.go new file mode 120000 index 0000000..f67563d --- /dev/null +++ b/tests/benchmarks/int64-add64/main.go @@ -0,0 +1 @@ +../../main.go \ No newline at end of file diff --git a/tests/benchmarks/int64-add64/stm.go b/tests/benchmarks/int64-add64/stm.go new file mode 100644 index 0000000..8e225c9 --- /dev/null +++ b/tests/benchmarks/int64-add64/stm.go @@ -0,0 +1,23 @@ +package stm + +import ( + "flag" +) + + + +var nFlag = flag.Int( + "n", + 1_000, + "The number of iterations to execute", +) + +func MainTest() { + flag.Parse() + n := *nFlag + + v := NewInt64(0) + for i := 0; i < n; i++ { + v.Add(1) + } +} -- cgit v1.2.3