Skip to content

Commit

Permalink
one more
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Feb 2, 2025
1 parent e5f08b2 commit 7a22885
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ func TestParsingWithTimeoutAndReset(t *testing.T) {
parser.SetLanguage(getLanguage("json"))

start := time.Now()
fmt.Println("start", start)
code := []byte("[\"ok\", 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]")
callback := func(offset int, _ Point) []byte {
if offset >= len(code) {
Expand All @@ -734,6 +735,7 @@ func TestParsingWithTimeoutAndReset(t *testing.T) {
callback,
nil,
&ParseOptions{ProgressCallback: func(ParseState) bool {
fmt.Println("start", start)
elapsed := time.Since(start).Nanoseconds()
fmt.Println("elapsed (ns)", elapsed)
return elapsed > 10000
Expand Down

0 comments on commit 7a22885

Please sign in to comment.