-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.go
More file actions
116 lines (96 loc) · 3.28 KB
/
runner.go
File metadata and controls
116 lines (96 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package main
import (
"fmt"
"time"
"example.com/utils"
)
func mains() {
mainTimeStart := time.Now()
// Day 01
funcTimeStart := time.Now()
d1p1 := d1p1()
fmt.Println("D1p1 result:", d1p1)
fmt.Println("D1p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d1p2 := d1p2()
fmt.Println("D1p2 result:", d1p2)
fmt.Println("D1p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 02
funcTimeStart = time.Now()
d2p1, err := d2p1()
utils.Check(err)
fmt.Println("D2p1 result:", d2p1)
fmt.Println("D2p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d2p2, err := d2p2()
utils.Check(err)
fmt.Println("D2p2 result:", d2p2)
fmt.Println("D2p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 03
funcTimeStart = time.Now()
d3p1, err := d3(2)
utils.Check(err)
fmt.Println("D3p1 result:", d3p1)
fmt.Println("D3p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d3p2, err := d3(12)
utils.Check(err)
fmt.Println("D3p2 result:", d3p2)
fmt.Println("D3p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 04
funcTimeStart = time.Now()
d4p1, err := d4p1()
utils.Check(err)
fmt.Println("D4p1 result:", d4p1)
fmt.Println("D4p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d4p2, err := d4p2()
utils.Check(err)
fmt.Println("D4p2 result:", d4p2)
fmt.Println("D4p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 05
funcTimeStart = time.Now()
d5p1, err := d5p1()
utils.Check(err)
fmt.Println("D5p1 result:", d5p1)
fmt.Println("D5p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d5p2, err := d5p2()
utils.Check(err)
fmt.Println("D5p2 result:", d5p2)
fmt.Println("D5p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 06
funcTimeStart = time.Now()
d6p1, err := d6p1()
utils.Check(err)
fmt.Println("D6p1 result:", d6p1)
fmt.Println("D6p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
funcTimeStart = time.Now()
d6p2, err := d6p2()
utils.Check(err)
fmt.Println("D6p2 result:", d6p2)
fmt.Println("D6p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 07
funcTimeStart = time.Now()
d7p1, err := d7p1()
utils.Check(err)
fmt.Println("D7p1 result:", d7p1)
fmt.Println("D7p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// funcTimeStart = time.Now()
// d7p2, err := d7p2()
// utils.Check(err)
// fmt.Println("D7p2 result:", d7p2)
// fmt.Println("D7p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// Day 08
funcTimeStart = time.Now()
d8p1, err := d8p1()
utils.Check(err)
fmt.Println("D8p1 result:", d8p1)
fmt.Println("D8p1 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
// funcTimeStart = time.Now()
// d8p2, err := d8p2()
// utils.Check(err)
// fmt.Println("D8p2 result:", d8p2)
// fmt.Println("D8p2 took:", time.Since(funcTimeStart).Microseconds(), "microseconds")
fmt.Println("All completed AOC 2025 challenges finished in", time.Since(mainTimeStart).Seconds(), "seconds /", time.Since(mainTimeStart).Microseconds(), "microseconds")
}