Skip to content

Commit

Permalink
Remove redundant benchmark test, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bombsimon committed Oct 3, 2023
1 parent 1112b73 commit 7eb5e84
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions inferrer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ func TestJTDInferWithDiscriminatorHints(t *testing.T) {
}

func BenchmarkInferOneRowNoMissingHints(b *testing.B) {
wors := generateRows(1)
rows := generateRows(1)
emptyHints := WithoutHints()

for n := 0; n < b.N; n++ {
InferStrings(wors, emptyHints)
InferStrings(rows, emptyHints)
}
}

Expand All @@ -268,24 +268,6 @@ func BenchmarkInferThousandRowsNoMissingHints(b *testing.B) {
}
}

func BenchmarkInferOneRowMissingHints(b *testing.B) {
rows := generateRows(1)
hints := Hints{}

for n := 0; n < b.N; n++ {
InferStrings(rows, hints)
}
}

func BenchmarkInferThousandRowsMissingHints(b *testing.B) {
rows := generateRows(1000)
hints := Hints{}

for n := 0; n < b.N; n++ {
InferStrings(rows, hints)
}
}

func generateRows(n int) []string {
row := `{"name":"bench", "speed":100.2}`
rows := []string{}
Expand Down

0 comments on commit 7eb5e84

Please sign in to comment.