ejromero / test

0 stars 0 forks source link

fetching alert with 16,000 transactions + score parsing in 6 seconds #1

Open ejromero opened 6 years ago

ejromero commented 6 years ago
[root@CentosAlertInsDev1 install]# curl -v -k 'https://22.232.212.67:30400/login/ldap' -H 'Content-Type: application/json' -d '{"username":"user","password":"aml4u"}'  2>&1 | grep -i cookie
< set-cookie: connect.sid=s%3A9IiqnzQL78ecwrMpO4AD6CKG-wQntbZz.o2SmLg0Q8sn7%2FHINTXmvmZ8qd37H%2BhtQ%2F2JJMyLatgs; Path=/; HttpOnly
[root@CentosAlertInsDev1 install]#  time curl --insecure 'https://22.232.212.67:30400/api/v1.0/alert/findByOriginalId?original_id=111994&1530109832810' -H 'Content-Type: application/json' -H 'Accept: application/json'  -H 'Cookie: connect.sid=s%3A9IiqnzQL78ecwrMpO4AD6CKG-wQntbZz.o2SmLg0Q8sn7%2FHINTXmvmZ8qd37H%2BhtQ%2F2JJMyLatgs' | python -c "import sys, json; j = json.load(sys.stdin)['reasons'][2]['score']; print json.dumps(j,sort_keys=True,indent=4, separators=(',', ': '))"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.4M  100 19.4M    0     0  3541k      0  0:00:05  0:00:05 --:--:-- 5618k
"513"

real    0m6.856s
user    0m1.192s
sys     0m0.224s
ejromero commented 6 years ago

test