Skip to content

Commit

Permalink
Remove the PEG query implementation. (tendermint#7336) (tendermint#9478)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe authored Oct 4, 2022
1 parent 45518db commit 5c23ffb
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 2,564 deletions.
26 changes: 0 additions & 26 deletions libs/pubsub/query/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"testing"

"github.com/tendermint/tendermint/libs/pubsub/query"
oldquery "github.com/tendermint/tendermint/libs/pubsub/query/oldquery"
)

const testQuery = `tm.events.type='NewBlock' AND abci.account.name='Igor'`
Expand All @@ -21,15 +20,6 @@ var testEvents = map[string][]string{
},
}

func BenchmarkParsePEG(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := oldquery.New(testQuery)
if err != nil {
b.Fatal(err)
}
}
}

func BenchmarkParseCustom(b *testing.B) {
for i := 0; i < b.N; i++ {
_, err := query.New(testQuery)
Expand All @@ -39,22 +29,6 @@ func BenchmarkParseCustom(b *testing.B) {
}
}

func BenchmarkMatchPEG(b *testing.B) {
q, err := oldquery.New(testQuery)
if err != nil {
b.Fatal(err)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
ok, err := q.Matches(testEvents)
if err != nil {
b.Fatal(err)
} else if !ok {
b.Error("no match")
}
}
}

func BenchmarkMatchCustom(b *testing.B) {
q, err := query.New(testQuery)
if err != nil {
Expand Down
10 changes: 0 additions & 10 deletions libs/pubsub/query/oldquery/Makefile

This file was deleted.

14 changes: 0 additions & 14 deletions libs/pubsub/query/oldquery/empty.go

This file was deleted.

28 changes: 0 additions & 28 deletions libs/pubsub/query/oldquery/empty_test.go

This file was deleted.

30 changes: 0 additions & 30 deletions libs/pubsub/query/oldquery/fuzz_test/main.go

This file was deleted.

97 changes: 0 additions & 97 deletions libs/pubsub/query/oldquery/parser_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions libs/pubsub/query/oldquery/peg.go

This file was deleted.

Loading

0 comments on commit 5c23ffb

Please sign in to comment.