Tightens up thresholds in performance tests.
James Phillips
8 years ago
15 | 15 | truth := GenerateLine(nodes, spacing) |
16 | 16 | Simulate(clients, truth, cycles, nil) |
17 | 17 | stats := Evaluate(clients, truth) |
18 | if stats.ErrorAvg > 0.004 || stats.ErrorMax > 0.015 { | |
18 | if stats.ErrorAvg > 0.0012 || stats.ErrorMax > 0.0055 { | |
19 | 19 | t.Fatalf("performance stats are out of spec: %v", stats) |
20 | 20 | } |
21 | 21 | } |
31 | 31 | truth := GenerateGrid(nodes, spacing) |
32 | 32 | Simulate(clients, truth, cycles, nil) |
33 | 33 | stats := Evaluate(clients, truth) |
34 | if stats.ErrorAvg > 0.005 || stats.ErrorMax > 0.051 { | |
34 | if stats.ErrorAvg > 0.0014 || stats.ErrorMax > 0.0158 { | |
35 | 35 | t.Fatalf("performance stats are out of spec: %v", stats) |
36 | 36 | } |
37 | 37 | } |
47 | 47 | truth := GenerateSplit(nodes, lan, wan) |
48 | 48 | Simulate(clients, truth, cycles, nil) |
49 | 49 | stats := Evaluate(clients, truth) |
50 | if stats.ErrorAvg > 0.044 || stats.ErrorMax > 0.343 { | |
50 | if stats.ErrorAvg > 0.000057 || stats.ErrorMax > 0.00035 { | |
51 | 51 | t.Fatalf("performance stats are out of spec: %v", stats) |
52 | 52 | } |
53 | 53 | } |
63 | 63 | truth := GenerateRandom(nodes, mean, deviation) |
64 | 64 | Simulate(clients, truth, cycles, nil) |
65 | 65 | stats := Evaluate(clients, truth) |
66 | if stats.ErrorAvg > 0.079 || stats.ErrorMax > 0.363 { | |
66 | if stats.ErrorAvg > 0.046 || stats.ErrorMax > 0.184 { | |
67 | 67 | t.Fatalf("performance stats are out of spec: %v", stats) |
68 | 68 | } |
69 | 69 | } |