Skip to content

Commit f9a3f64

Browse files
only log if slow
1 parent aa55d72 commit f9a3f64

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/buildkitetestjson.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function write_testset_json_files(dir::String, testset::Test.DefaultTestSet)
214214
res_file = joinpath(dir, "results_$(name)_$(i).json")
215215
open(io -> json_repr(io, chunk), res_file, "w")
216216
push!(files, res_file)
217-
@info "Saved $(basename(res_file)) ($(Base.format_bytes(filesize(res_file))))"
217+
@debug "Saved $(basename(res_file)) ($(Base.format_bytes(filesize(res_file))))"
218218
end
219219
return files
220220
end

test/testdefs.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@ function runtests(name, path, isolate=true; seed=nothing)
8989
tc = Test.get_test_counts(ts)
9090

9191
if Base.get_bool_env("CI", false)
92-
@info "Writing test result data to $(@__DIR__)"
92+
# @info "Writing test result data to $(@__DIR__)"
9393
# Profile.clear()
94-
@time "write_testset_json_files" write_testset_json_files(@__DIR__, ts)
94+
t = @elapsed result_files = write_testset_json_files(@__DIR__, ts)
95+
if t > 5
96+
sizes = map(f -> Base.format_bytes(filesize(f)), result_files)
97+
result_files_info = Dict(zip(result_files, sizes))
98+
@warn "Writing test result data was slow: $t seconds" result_files_info
99+
end
95100
# Profile.print(IOContext(stdout, :displaysize=>(1000,200)), noisefloor=1.0)
96101
end
97102

0 commit comments

Comments
 (0)