Body: 11 bytes
Write: s/iter LWP HTTPTiny NetCurl Hijk LWP 8.58 -- -43% -60% -64% HTTPTiny 4.92 75% -- -31% -37% NetCurl 3.42 151% 44% -- -10% Hijk 3.07 179% 60% 11% --
Read:
e_smiley :-) :) :o) :] :3 :c) :> =] 8) =) :} :^) :っ) :-)) :-))) :-)))) :)) :))) :)))) | |
e_laugh :-D :D 8-D 8D x-D xD X-D XD =-D =D =-3 =3 B^D | |
e_sad >:[ :-( :( :-c :c :-< :っC :< :-[ :[ :{ | |
e_wink_frown ;( | |
e_angry :-|| :@ >:( | |
e_cry :'-( :'( | |
e_happy_tears :'-) :') | |
e_disgust D:< D: D8 D; D= DX v.v D-': | |
e_surprise >:O :-O :O :-o :o 8-0 O_O o-o O_o o_O o_o O-O | |
e_kiss :* :^* '}{' |
curl -XDELETE "http://localhost:9200/myindex" | |
# insert some data | |
curl -XPOST "http://localhost:9200/myindex/log/_bulk" -d' | |
{ "index": {}} | |
{ "num": 1, "date": "2014-01-01"} | |
{ "index": {}} | |
{ "num": 2, "date": "2014-01-02"} | |
{ "index": {}} | |
{ "num": 3, "date": "2014-01-03"} |
curl -XDELETE "http://localhost:9200/myindex" | |
curl -XPUT "http://localhost:9200/myindex" -d' | |
{ | |
"mappings": { | |
"animal": {}, | |
"customer": { | |
"_parent": { | |
"type": "animal" | |
}, |
curl -XPUT "http://localhost:9200/production_index" -d' | |
{ | |
"mappings": { | |
"production": { | |
"properties": { | |
"production_title": { | |
"type": "multi_field", | |
"fields": { | |
"production_title_edgengram": { | |
"type": "string", |
GET /_search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"myfield": { | |
"query": "quick brown fox", | |
"fuzziness": "AUTO", |
curl -XGET "http://localhost:9200/_search" -d' | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"myfield": { | |
"query": "quick brown fox", | |
"fuzziness": "AUTO", |
DELETE /_all | |
PUT /myindex | |
{ | |
"settings": { | |
"number_of_shards": 1 | |
} | |
} | |
POST /myindex/mytype/1 |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Benchmark qw(timeit cmpthese timesum :hireswallclock); | |
use lib 'lib', '../p5-http-tiny/lib'; | |
use Elasticsearch; | |
use v5.16; | |
my $Times = 3; |
Body: 11 bytes
Write: s/iter LWP HTTPTiny NetCurl Hijk LWP 8.58 -- -43% -60% -64% HTTPTiny 4.92 75% -- -31% -37% NetCurl 3.42 151% 44% -- -10% Hijk 3.07 179% 60% 11% --
Read:
HTTP Tiny with keep-alive OFF
Write: Rate HTTPTiny LWP NetCurl Hijk HTTPTiny 1.12/s -- -4% -61% -63% LWP 1.17/s 4% -- -59% -61% NetCurl 2.83/s 154% 143% -- -7% Hijk 3.03/s 171% 160% 7% --
Read: