@@ -64,6 +64,30 @@ cd(dirname(@__FILE__)) do
64
64
print_with_color (:white , rpad (" Test (Worker)" ,name_align," " ), " | " )
65
65
print_with_color (:white , " Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)\n " )
66
66
results= []
67
+ print_lock = ReentrantLock ()
68
+
69
+ function print_testworker_stats (test, wrkr, resp)
70
+ lock (print_lock)
71
+ try
72
+ print_with_color (:white , rpad (test* " ($wrkr )" , name_align, " " ), " | " )
73
+ time_str = @sprintf (" %7.2f" ,resp[2 ])
74
+ print_with_color (:white , rpad (time_str,elapsed_align," " ), " | " )
75
+ gc_str = @sprintf (" %5.2f" ,resp[5 ]. total_time/ 10 ^ 9 )
76
+ print_with_color (:white , rpad (gc_str,gc_align," " ), " | " )
77
+
78
+ # since there may be quite a few digits in the percentage,
79
+ # the left-padding here is less to make sure everything fits
80
+ percent_str = @sprintf (" %4.1f" ,100 * resp[5 ]. total_time/ (10 ^ 9 * resp[2 ]))
81
+ print_with_color (:white , rpad (percent_str,percent_align," " ), " | " )
82
+ alloc_str = @sprintf (" %5.2f" ,resp[3 ]/ 2 ^ 20 )
83
+ print_with_color (:white , rpad (alloc_str,alloc_align," " ), " | " )
84
+ rss_str = @sprintf (" %5.2f" ,resp[6 ]/ 2 ^ 20 )
85
+ print_with_color (:white , rpad (rss_str,rss_align," " ), " \n " )
86
+ finally
87
+ unlock (print_lock)
88
+ end
89
+ end
90
+
67
91
@sync begin
68
92
for p in workers ()
69
93
@async begin
@@ -91,22 +115,8 @@ cd(dirname(@__FILE__)) do
91
115
error (" Halting tests. Memory limit reached : $resp > $max_worker_rss " )
92
116
end
93
117
end
94
- if ! isa (resp[1 ], Exception)
95
- print_with_color (:white , rpad (test* " ($wrkr )" , name_align, " " ), " | " )
96
- time_str = @sprintf (" %7.2f" ,resp[2 ])
97
- print_with_color (:white , rpad (time_str,elapsed_align," " ), " | " )
98
- gc_str = @sprintf (" %5.2f" ,resp[5 ]. total_time/ 10 ^ 9 )
99
- print_with_color (:white , rpad (gc_str,gc_align," " ), " | " )
100
-
101
- # since there may be quite a few digits in the percentage,
102
- # the left-padding here is less to make sure everything fits
103
- percent_str = @sprintf (" %4.1f" ,100 * resp[5 ]. total_time/ (10 ^ 9 * resp[2 ]))
104
- print_with_color (:white , rpad (percent_str,percent_align," " ), " | " )
105
- alloc_str = @sprintf (" %5.2f" ,resp[3 ]/ 2 ^ 20 )
106
- print_with_color (:white , rpad (alloc_str,alloc_align," " ), " | " )
107
- rss_str = @sprintf (" %5.2f" ,resp[6 ]/ 2 ^ 20 )
108
- print_with_color (:white , rpad (rss_str,rss_align," " ), " \n " )
109
- end
118
+
119
+ ! isa (resp[1 ], Exception) && print_testworker_stats (test, wrkr, resp)
110
120
end
111
121
if p != 1
112
122
# Free up memory =)
@@ -115,18 +125,20 @@ cd(dirname(@__FILE__)) do
115
125
end
116
126
end
117
127
end
128
+
129
+ n > 1 && length (node1_tests) > 1 && print (" \n Executing tests that run on node 1 only:\n " )
118
130
for t in node1_tests
119
131
# As above, try to run each test
120
132
# which must run on node 1. If
121
133
# the test fails, catch the error,
122
134
# and either way, append the results
123
135
# to the overall aggregator
124
- n > 1 && print (" From worker 1:\t " )
125
136
isolate = true
126
137
t == " SharedArrays" && (isolate = false )
127
138
local resp
128
139
try
129
140
resp = eval (Expr (:call , () -> runtests (t, test_path (t), isolate, seed= seed))) # runtests is defined by the include above
141
+ print_testworker_stats (t, 1 , resp)
130
142
catch e
131
143
resp = [e]
132
144
end
0 commit comments