Skip to content

Commit 7a1dde0

Browse files
committed
fix tests, remove reports
1 parent d380287 commit 7a1dde0

File tree

5 files changed

+3
-160
lines changed

5 files changed

+3
-160
lines changed

wasp/benchspy/direct_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func TestBenchSpy_DirectQueryExecutor_Execute(t *testing.T) {
237237
// expected median latency: (150ms, 151ms>
238238
resultsAsFloats, err := ResultsAs(0.0, executor, string(MedianLatency), string(Percentile95Latency), string(Percentile99Latency), string(ErrorRate))
239239
assert.NoError(t, err)
240-
require.Equal(t, 3, len(resultsAsFloats))
240+
require.Equal(t, 4, len(resultsAsFloats))
241241
require.InDelta(t, 151.0, resultsAsFloats[string(MedianLatency)], 1.0)
242242

243243
// since we have 2-3 responses with 200-201ms latency, the 95th percentile should be (200ms, 201ms>

wasp/benchspy/report.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func CompareDirectWithThresholds(medianThreshold, p95Threshold, p99Threshold, ma
178178
Str("Previous report", previousReport.CommitOrTag).
179179
Float64("Median threshold", medianThreshold).
180180
Float64("P95 threshold", p95Threshold).
181-
Float64("P95 threshold", p99Threshold).
181+
Float64("P99 threshold", p99Threshold).
182182
Float64("Max threshold", maxThreshold).
183183
Float64("Error rate threshold", errorRateThreshold).
184184
Msg("Comparing Direct metrics with thresholds")

wasp/benchspy/report_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ func TestBenchSpy_CompareDirectWithThresholds(t *testing.T) {
16211621
assert.True(t, failed)
16221622
assert.NotNil(t, err)
16231623
assert.Contains(t, err.Error(), fmt.Sprintf("[test-gen] %s metric results were missing from previous report", string(Percentile95Latency)))
1624-
assert.Contains(t, err.Error(), fmt.Sprintf("[test-gen] %s metric results were missing from current report", string(Percentile99Latency)))
1624+
assert.Contains(t, err.Error(), fmt.Sprintf("[test-gen] %s metric results were missing from previous report", string(Percentile99Latency)))
16251625
assert.Contains(t, err.Error(), fmt.Sprintf("[test-gen] %s metric results were missing from previous report", string(MaxLatency)))
16261626
assert.Contains(t, err.Error(), fmt.Sprintf("[test-gen] %s metric results were missing from previous report", string(ErrorRate)))
16271627
})

wasp/examples/benchspy/direct_query_executor/test_performance_reports/TestBenchSpy_Standard_Direct_Metrics-v1.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

wasp/examples/benchspy/direct_query_executor/test_performance_reports/TestBenchSpy_Standard_Direct_Metrics_Two_Generators-v1.json

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)