From 80e1c9cac12f9b0ed1dc610c9b1649ebfcbed399 Mon Sep 17 00:00:00 2001 From: Emile Date: Fri, 5 Apr 2019 17:55:24 +0200 Subject: added additional debug info --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index e39e8e5..e92ce1d 100644 --- a/main.go +++ b/main.go @@ -64,16 +64,16 @@ func main() { threadStartTime := doneStartingThreads.Sub(overallStartTime) calculationTime := doneGettingResults.Sub(overallStartTime) - fmt.Printf("--------------------------------------------------------------------------------") + fmt.Printf("--------------------------------------------------------------------------------\n") fmt.Printf("Amount of Stars: %d\n", amountOfStars) + fmt.Printf("Amount of Calculations: %e\n", float64(amountOfStars*amountOfStars)) fmt.Printf("Amount of Threads: %d\n", cores) fmt.Printf("Amount of stars per thread: %d\n", starsPerCore) fmt.Printf("Thread start time: %f sec.\n", threadStartTime.Seconds()) fmt.Printf("Calculation time: %f sec.\n", calculationTime.Seconds()) fmt.Printf("Calculation time per star: %f sec.\n", calculationTime.Seconds()/float64(amountOfStars)) - fmt.Printf("Calculation per second: %f sec.\n", calculationTime.Seconds()/float64(amountOfStars)) + fmt.Printf("Calculation per second: %e\n", float64(amountOfStars*amountOfStars)/calculationTime.Seconds()) } - } type Star struct { -- cgit 1.4.1