Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/formatter/expression_scaling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ import (
// and the 64x bound leaves room for noisy shared CI runners. Build ASTs outside the measurement so
// parser limits and parsing time do not conceal formatter regressions.
func TestFormatASTExpressionLinearGrowth(t *testing.T) {
// Race instrumentation inflates allocation-heavy paths unevenly across
// input sizes, so the growth ratio is only meaningful without it.
if raceEnabled {
t.Skip("timing ratios are unreliable under the race detector")
}
for _, shape := range []struct {
name string
small int
Expand Down
20 changes: 20 additions & 0 deletions pkg/formatter/race_enabled_norace_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2026 GoSQLX Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !race

package formatter_test

// raceEnabled reports whether the race detector instruments this test binary.
const raceEnabled = false
20 changes: 20 additions & 0 deletions pkg/formatter/race_enabled_race_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2026 GoSQLX Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build race

package formatter_test

// raceEnabled reports whether the race detector instruments this test binary.
const raceEnabled = true
Loading