diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-01-29 14:17:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 14:17:40 -0800 |
commit | 961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch) | |
tree | 3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/gopkg.in/olivere/elastic.v5/request_test.go | |
parent | 8d66523ba7d9a77129844be476732ebfd5272d64 (diff) | |
download | chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2 chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip |
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/request_test.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/request_test.go | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/request_test.go b/vendor/gopkg.in/olivere/elastic.v5/request_test.go index d5ae4f800..04fbecbab 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/request_test.go +++ b/vendor/gopkg.in/olivere/elastic.v5/request_test.go @@ -29,22 +29,7 @@ func BenchmarkRequestSetBodyString(b *testing.B) { } for i := 0; i < b.N; i++ { body := `{"query":{"match_all":{}}}` - err = req.SetBody(body, false) - if err != nil { - b.Fatal(err) - } - } - testReq = req -} - -func BenchmarkRequestSetBodyStringGzip(b *testing.B) { - req, err := NewRequest("GET", "/") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - body := `{"query":{"match_all":{}}}` - err = req.SetBody(body, true) + err = req.SetBody(body) if err != nil { b.Fatal(err) } @@ -59,22 +44,7 @@ func BenchmarkRequestSetBodyBytes(b *testing.B) { } for i := 0; i < b.N; i++ { body := []byte(`{"query":{"match_all":{}}}`) - err = req.SetBody(body, false) - if err != nil { - b.Fatal(err) - } - } - testReq = req -} - -func BenchmarkRequestSetBodyBytesGzip(b *testing.B) { - req, err := NewRequest("GET", "/") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - body := []byte(`{"query":{"match_all":{}}}`) - err = req.SetBody(body, true) + err = req.SetBody(body) if err != nil { b.Fatal(err) } @@ -93,26 +63,7 @@ func BenchmarkRequestSetBodyMap(b *testing.B) { "match_all": map[string]interface{}{}, }, } - err = req.SetBody(body, false) - if err != nil { - b.Fatal(err) - } - } - testReq = req -} - -func BenchmarkRequestSetBodyMapGzip(b *testing.B) { - req, err := NewRequest("GET", "/") - if err != nil { - b.Fatal(err) - } - for i := 0; i < b.N; i++ { - body := map[string]interface{}{ - "query": map[string]interface{}{ - "match_all": map[string]interface{}{}, - }, - } - err = req.SetBody(body, true) + err = req.SetBody(body) if err != nil { b.Fatal(err) } |