commit | b2698efd0327510a875b3bd338f9376133dcec85 | [log] [tgz] |
---|---|---|
author | Kenneth Chan <kenneth@prediction.io> | Wed Feb 04 19:05:33 2015 -0800 |
committer | Kenneth Chan <kenneth@prediction.io> | Wed Feb 04 19:05:33 2015 -0800 |
tree | 3fd4e3a59d0ae29c8578a21e8b43510b80c3c11a | |
parent | a2cc3fc98ad841c44f84255cb4cfafd39d097a03 [diff] |
Use local model for faster serving
$ python data/import_eventserver.py --access_key <your_access_key>
normal:
curl -H "Content-Type: application/json" \ -d '{ "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"], "num": 10}' \ http://localhost:8000/queries.json \ -w %{time_connect}:%{time_starttransfer}:%{time_total}
curl -H "Content-Type: application/json" \ -d '{ "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"], "num": 10, "categories" : ["c4", "c3"] }' \ http://localhost:8000/queries.json \ -w %{time_connect}:%{time_starttransfer}:%{time_total}
curl -H "Content-Type: application/json" \ -d '{ "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"], "num": 10, "whiteList": ["i21", "i26", "i40"] }' \ http://localhost:8000/queries.json \ -w %{time_connect}:%{time_starttransfer}:%{time_total}
curl -H "Content-Type: application/json" \ -d '{ "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"], "num": 10, "blackList": ["i21", "i26", "i40"] }' \ http://localhost:8000/queries.json \ -w %{time_connect}:%{time_starttransfer}:%{time_total}
unknown item:
curl -H "Content-Type: application/json" \ -d '{ "items": ["unk1", "i3", "i10", "i2", "i5", "i31", "i9"], "num": 10}' \ http://localhost:8000/queries.json \ -w %{time_connect}:%{time_starttransfer}:%{time_total}
all unknown items:
curl -H “Content-Type: application/json”
-d ‘{ “items”: [“unk1”, “unk2”, “unk3”, “unk4”], “num”: 10}’
http://localhost:8000/queries.json
-w %{time_connect}:%{time_starttransfer}:%{time_total}