Modify restconf tests to run for both evhtp and fcgi: , curl -sik, etc
This commit is contained in:
parent
126cc209f4
commit
3af184c655
37 changed files with 340 additions and 274 deletions
|
|
@ -107,14 +107,17 @@ if [ $BE -ne 0 ]; then
|
|||
wait_backend
|
||||
fi
|
||||
|
||||
new "kill old restconf daemon"
|
||||
sudo pkill -u $wwwuser -f clixon_restconf
|
||||
if [ $RC -ne 0 ]; then
|
||||
|
||||
new "start restconf daemon"
|
||||
start_restconf -f $cfg
|
||||
new "kill old restconf daemon"
|
||||
stop_restconf_pre
|
||||
|
||||
new "waiting"
|
||||
wait_restconf
|
||||
new "start restconf daemon"
|
||||
start_restconf -f $cfg
|
||||
|
||||
new "waiting"
|
||||
wait_restconf
|
||||
fi
|
||||
|
||||
new "cli get large config"
|
||||
# baseline on thinkpad i5-3320M CPU @ 2.60GHz and 500K entries: 39.71s
|
||||
|
|
@ -137,17 +140,16 @@ new "netconf get $perfreq single reqs"
|
|||
done | $clixon_netconf -qf $cfg > /dev/null; } 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
# RESTCONF get
|
||||
#echo "curl -s -X GET http://localhost/restconf/data/example:interfaces/a=foo/b/interface=e1"
|
||||
#echo "curl -sik -X GET $RCPROTO://localhost/restconf/data/example:interfaces/a=foo/b/interface=e1"
|
||||
new "restconf get test single req"
|
||||
time -p expectpart "$(curl -sik -X GET $RCPROTO://localhost/restconf/data/example:interfaces/a=foo/b/interface=e1)" 0 '{"example:interface":[{"name":"e1","type":"ex:eth","status":"up"}]}' | awk '/real/ {print $2}'
|
||||
|
||||
new "restconf get $perfreq single reqs"
|
||||
#echo "curl -sG http://localhost/restconf/data/ietf-interfaces:interfaces/interface=e0"
|
||||
#curl -sG http://localhost/restconf/data/ietf-interfaces:interfaces/interface=e67
|
||||
#curl -sik -X GET $RCPROTO://localhost/restconf/data/ietf-interfaces:interfaces/interface=e67
|
||||
|
||||
{ time -p for (( i=0; i<$perfreq; i++ )); do
|
||||
rnd=$(( ( RANDOM % $perfnr ) ))
|
||||
curl -sG http://localhost/restconf/data/example:interfaces/a/b/interface=e$rnd > /dev/null
|
||||
curl -sik -X GET $RCPROTO://localhost/restconf/data/example:interfaces/a/b/interface=e$rnd > /dev/null
|
||||
done } 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
if false; then
|
||||
|
|
@ -171,13 +173,15 @@ new "netconf get large config"
|
|||
{ time -p echo "<rpc><get> <filter type=\"xpath\" select=\"/ex:interfaces/ex:a[name='foo']/ex:b\" xmlns:ex=\"urn:example:clixon\"/></get></rpc>]]>]]>" | $clixon_netconf -qf $cfg > /tmp/netconf; } 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
new "restconf get large config"
|
||||
$TIMEFN curl -sG http://localhost/restconf/data/example:interfaces/a=foo/b 2>&1 | awk '/real/ {print $2}'
|
||||
$TIMEFN curl -sik -X GET $RCPROTO://localhost/restconf/data/example:interfaces/a=foo/b 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
new "cli get large config"
|
||||
$TIMEFN $clixon_cli -1f $cfg show state xml 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
new "Kill restconf daemon"
|
||||
stop_restconf
|
||||
if [ $RC -ne 0 ]; then
|
||||
new "Kill restconf daemon"
|
||||
stop_restconf
|
||||
fi
|
||||
|
||||
if [ $BE -ne 0 ]; then
|
||||
new "Kill backend"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue