From 4d3c4cfac70557a28a62266543951d46d0cae584 Mon Sep 17 00:00:00 2001 From: sundb Date: Wed, 5 Jan 2022 19:49:01 +0800 Subject: Show the elapsed time of single test and speed up some tests (#10058) Following #10038. This PR introduces two changes. 1. Show the elapsed time of a single test in the test output, in order to have a more detailed understanding of the changes in test run time. 2. Speedup two tests related to `key-load-delay` configuration. other tests do not seem to be affected by #10003. --- tests/support/test.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/support') diff --git a/tests/support/test.tcl b/tests/support/test.tcl index b35b29185..f3f7e132a 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -180,6 +180,7 @@ proc test {name code {okpattern undefined} {tags {}}} { send_data_packet $::test_server_fd testing $name + set test_start_time [clock milliseconds] if {[catch {set retval [uplevel 1 $code]} error]} { set assertion [string match "assertion:*" $error] if {$assertion || $::durable} { @@ -207,7 +208,8 @@ proc test {name code {okpattern undefined} {tags {}}} { } else { if {$okpattern eq "undefined" || $okpattern eq $retval || [string match $okpattern $retval]} { incr ::num_passed - send_data_packet $::test_server_fd ok $name + set elapsed [expr {[clock milliseconds]-$test_start_time}] + send_data_packet $::test_server_fd ok $name $elapsed } else { set msg "Expected '$okpattern' to equal or match '$retval'" lappend details $msg -- cgit v1.2.1