Commit c3c3e4f8 authored by Howl's avatar Howl
Browse files

Add execution time thing

parent 281a3411
Loading
Loading
Loading
Loading
+4 −0
Changes for cron.go: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import (
	"database/sql"
	"fmt"
	"sync"
	"time"

	"github.com/fatih/color"
	_ "github.com/go-sql-driver/mysql"
@@ -82,6 +83,8 @@ func main() {
	}
	color.Green(" ok!")

	timeAtStart := time.Now()

	if c.CalculateAccuracy {
		fmt.Print("Starting accuracy calculator worker...")
		wg.Add(1)
@@ -120,6 +123,7 @@ func main() {

	wg.Wait()
	color.Green("Data elaboration has been terminated.")
	color.Green("Execution time: %.4fs", time.Now().Sub(timeAtStart).Seconds())
	color.Yellow("Waiting for workers to finish...")
	close(execOperations)
	chanWg.Wait()