summaryrefslogtreecommitdiff
path: root/internal/ior.go
diff options
context:
space:
mode:
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)
}