summaryrefslogtreecommitdiff
path: root/internal/ior.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-03-11 09:23:08 +0200
committerPaul Buetow <paul@buetow.org>2025-03-11 09:23:08 +0200
commita7f6f047de1e0ae56a0ef3a4c74e86f4f8f6eeb7 (patch)
tree275835414455889f796c24faa5536e2e1770996f /internal/ior.go
parent786a23174a450a8a92907404a1beaef3231f4794 (diff)
add statistics
Diffstat (limited to 'internal/ior.go')
-rw-r--r--internal/ior.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/ior.go b/internal/ior.go
index 2fbbb58..1f62eea 100644
--- a/internal/ior.go
+++ b/internal/ior.go
@@ -76,10 +76,13 @@ func Run(flags flags.Flags) {
pprof.StartCPUProfile(cpuProfile)
}
+ loop := newEventLoop(flags)
+
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
+ fmt.Println(loop.stats())
fmt.Println("Good bye...")
if flags.PprofEnable {
fmt.Println("Stoppig profiling, writing ior.cpuprofile and ior.memprofile")
@@ -89,5 +92,5 @@ func Run(flags flags.Flags) {
os.Exit(0)
}()
- newEventLoop(flags).run(ch)
+ loop.run(ch)
}