manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
8.93k stars 495 forks source link

Added a condition to output variable values if the difference between… #2563

Closed PavelShilin89 closed 2 days ago

PavelShilin89 commented 1 week ago

Added a condition to the test to output variable values if the difference between $curl and $mysql values is greater than or equal to 2%. This is necessary for quick viewing of these values in CI.

github-actions[bot] commented 1 week ago

clt-amd64

πŸ‘Ž CLT tests in test/clt-tests/comparison-overhead-json-sql/test-comparison- βœ… OK: 0 ❌ Failed: 1 ⏳ Duration: 89s πŸ‘‰ Check Action Results for commit 78c2c97 Failed tests:

test/clt-tests/comparison-overhead-json-sql/test-comparison-overhead-json-sql.rec ```diff ––– input ––– rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi ––– output ––– Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE}) Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com) Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com) [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)... starting daemon version '%{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})' ... listening on %{IPADDR}:9312 for sphinx and http(s) listening on %{IPADDR}:9306 for mysql listening on %{IPADDR}:9308 for sphinx and http(s) Buddy started! ––– input ––– php -d memory_limit=-1 ./test/clt-tests/scripts/load_us_names.php 10000 10 10000000 1 > /dev/null ––– output ––– ––– input ––– export start=$(date +%s%N) ––– output ––– ––– input ––– for n in `seq 1 100`; do curl -sX POST http://localhost:9308/search -d '{"index" : "name", "query" : {"match" : {"_all": "on"} }, "limit": 0}'; done > /dev/null ––– output ––– ––– input ––– export end=$(date +%s%N) ––– output ––– ––– input ––– export curl=$(( (end - start) / 1000000 )) ––– output ––– ––– input ––– export start=$(date +%s%N) ––– output ––– ––– input ––– for n in `seq 1 100`; do mysql -P9306 -h0 -e "select * from name where match('on'); show meta;"; done > /dev/null ––– output ––– ––– input ––– export end=$(date +%s%N) ––– output ––– ––– input ––– export mysql=$(( (end - start) / 1000000 )) ––– output ––– ––– input ––– echo "Duration: ${mysql} ${curl} ms" ––– output ––– + Duration: 502 619 ms ––– input ––– php -r "exit(round(abs($curl - $mysql) / ($curl + $mysql)/2 * 100, 0) >= 2);" 2>\dev\null && echo "----$?----" ––– output ––– - ----0---- + 1----0---- ```