From 56f869c10f402d9905ad7bf7c6a16b02fe280d4e Mon Sep 17 00:00:00 2001 From: xing Date: Tue, 21 Feb 2023 20:15:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=BE=83=E4=B8=8B=E4=BA=86=E4=B8=8Bsc?= =?UTF-8?q?anner=E7=9A=84=E6=80=A7=E8=83=BD=EF=BC=8C=E4=BC=BC=E4=B9=8E?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=B8=8D=E6=98=AF=E5=A4=AA=E9=AB=98=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E7=B1=BB=E5=9E=8B=E6=96=AD=E8=A8=80=E5=A4=AA?= =?UTF-8?q?=E5=A4=9A=E4=BA=86=E4=BA=9B=EF=BC=9F=EF=BC=9F=EF=BC=9F=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=B3=9B=E5=9E=8B=E6=96=B9=E6=B3=95=E5=95=8A=E3=80=82?= =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/querycondition_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/model/querycondition_test.go b/model/querycondition_test.go index 0a84cd0..0f37088 100644 --- a/model/querycondition_test.go +++ b/model/querycondition_test.go @@ -506,3 +506,28 @@ func Test_findScanner(t *testing.T) { }) } } + +func BenchmarkScannerXX(b *testing.B) { + for i := 0; i < b.N; i++ { + err := findScanner[options](glob, ctx, func(t options) { + _ = t + //fmt.Println(t) + }, Conditions(Where(SqlBuilder{{"option_id", "<", "100", "int"}}))) + if err != nil { + panic(err) + } + } +} + +func BenchmarkFindsXX(b *testing.B) { + for i := 0; i < b.N; i++ { + r, err := finds[options](glob, ctx, Conditions(Where(SqlBuilder{{"option_id", "<", "100", "int"}}))) + if err != nil { + panic(err) + } + for _, o := range r { + _ = o + //fmt.Println(o) + } + } +}