From 21a050c953d413da8d01c36923c1208cfad2ec32 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 1 Sep 2021 14:45:20 -0500 Subject: [PATCH] BENCH: add some benchmarks Signed-off-by: Jeff Carr --- Makefile | 2 ++ example-bench-fast-timer/README.md | 5 +++++ {bench1 => example-bench-fast-timer}/fast-timer.go | 0 {bench1 => example-bench-readWriteOps}/readWriteOps.go | 0 4 files changed, 7 insertions(+) create mode 100644 example-bench-fast-timer/README.md rename {bench1 => example-bench-fast-timer}/fast-timer.go (100%) rename {bench1 => example-bench-readWriteOps}/readWriteOps.go (100%) diff --git a/Makefile b/Makefile index 39e7a8d..cc629d6 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,8 @@ build: # golang things cd example-pprof; go install # dump out go process internals + cd example-bench-fast-timer; go install # time golang channels + cd example-bench-readWriteOps; go install # prep: make -C example-nohup prep diff --git a/example-bench-fast-timer/README.md b/example-bench-fast-timer/README.md new file mode 100644 index 0000000..b170b90 --- /dev/null +++ b/example-bench-fast-timer/README.md @@ -0,0 +1,5 @@ +jcarr@lenovo-z70:~/go/bin$ ./example-bench-fast-timer +main() started 552ns +Response from chan2 Value 1 19.922µs +main() stopped 24.821µs + diff --git a/bench1/fast-timer.go b/example-bench-fast-timer/fast-timer.go similarity index 100% rename from bench1/fast-timer.go rename to example-bench-fast-timer/fast-timer.go diff --git a/bench1/readWriteOps.go b/example-bench-readWriteOps/readWriteOps.go similarity index 100% rename from bench1/readWriteOps.go rename to example-bench-readWriteOps/readWriteOps.go