aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmarks/interface-store/stm.go
blob: 8e9a36b79c57b4cbcd8f798bf3282af0e8b8da26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package stm

import (
	"flag"
	"fmt"
)



var nFlag = flag.Int(
	"n",
	1_000,
	"The number of iterations to execute",
)

func MainTest() {
	flag.Parse()
	n := *nFlag

	var v Interface[string] = New("hello")
	for i := 0; i < n; i++ {
		v.Store(fmt.Sprint(i))
	}
}