Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-vasile committed Oct 13, 2024
1 parent 816e65c commit 1d39965
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
with:
go-version-file: 'go.mod'

- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m > /tmp/prev &
- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m > /tmp/prev
- name: Checkout code
uses: actions/[email protected]
- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m | tee /tmp/curr
- run: go test -run=none -bench=. -count=30 -benchtime=100ms -timeout=20m > /tmp/curr

- run: go install golang.org/x/perf/cmd/benchstat@latest
- run: benchstat /tmp/prev /tmp/curr
4 changes: 2 additions & 2 deletions internal/magic/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ var strs = []string{}
// TODO: This function does not parse BOM-less UTF16 and UTF32 files. Not really
// sure it should. Linux file utility also requires a BOM for UTF16 and UTF32.
func Text(raw []byte, limit uint32) bool {
time.Sleep(time.Microsecond)
strs = append(strs, "aaaaa")
// time.Sleep(time.Microsecond)
// strs = append(strs, "aaaaa")
// First look for BOM.
if cset := charset.FromBOM(raw); cset != "" {
return true
Expand Down

0 comments on commit 1d39965

Please sign in to comment.