|
56 | 56 | end
|
57 | 57 | end
|
58 | 58 |
|
59 |
| -@testset "stringify plot - performance regression" begin |
60 |
| - p = heatmap(collect(1:30) * collect(1:30)') |
61 |
| - @test string(p; color = true) isa String # 1st pass - ttfp |
62 |
| - |
63 |
| - measure = Sys.islinux() && VERSION > v"1.10.0" && length(VERSION.prerelease) < 2 |
| 59 | +sombrero(x, y) = 30sinc(√(x^2 + y^2) / π) |
64 | 60 |
|
65 |
| - if measure |
66 |
| - GC.enable(false) |
67 |
| - stats = @timed string(p; color = true) # repeated ! |
68 |
| - @test stats.bytes / 1e3 < 400 # ~ 356kB on 1.10 |
69 |
| - @test stats.time * 1e3 < 0.5 # ~ 0.3ms on 1.10 |
70 |
| - GC.enable(true) |
| 61 | +@testset "stringify plot - performance regression" begin |
| 62 | + nightly = occursin("DEV", string(VERSION)) # or length(VERSION.prerelease) < 2 |
| 63 | + measure = Sys.islinux() && VERSION > v"1.10.0-" && !nightly |
| 64 | + |
| 65 | + let p = heatmap(collect(1:30) * collect(1:30)') |
| 66 | + @test string(p; color = true) isa String # 1st pass - ttfp |
| 67 | + |
| 68 | + if measure |
| 69 | + GC.enable(false) |
| 70 | + stats = @timed string(p; color = true) # repeated ! |
| 71 | + @test stats.bytes / 1e3 < 500 # ~ 356kB on 1.10 |
| 72 | + @test stats.time * 1e3 < 0.8 # ~ 0.3ms on 1.10 |
| 73 | + GC.enable(true) |
| 74 | + end |
71 | 75 | end
|
72 | 76 |
|
73 |
| - sombrero(x, y) = 30sinc(√(x^2 + y^2) / π) |
74 |
| - p = surfaceplot(-8:0.5:8, -8:0.5:8, sombrero; axes3d = false) |
75 |
| - @test string(p; color = true) isa String # 1st pass - ttfp |
| 77 | + let p = surfaceplot(-8:0.5:8, -8:0.5:8, sombrero; axes3d = false) |
| 78 | + @test string(p; color = true) isa String # 1st pass - ttfp |
76 | 79 |
|
77 |
| - if measure |
78 |
| - GC.enable(false) |
79 |
| - stats = @timed string(p; color = true) # repeated ! |
80 |
| - @test stats.bytes / 1e3 < 160 # ~ 152kB on 1.10 |
81 |
| - @test stats.time * 1e3 < 0.5 # ~ 0.26ms on 1.10 |
82 |
| - GC.enable(true) |
| 80 | + if measure |
| 81 | + GC.enable(false) |
| 82 | + stats = @timed string(p; color = true) # repeated ! |
| 83 | + @test stats.bytes / 1e3 < 160 # ~ 152kB on 1.10 |
| 84 | + @test stats.time * 1e3 < 0.5 # ~ 0.26ms on 1.10 |
| 85 | + GC.enable(true) |
| 86 | + end |
83 | 87 | end
|
84 | 88 | end
|
85 | 89 |
|
|
0 commit comments