From: Glenn H. <thr...@us...> - 2004-12-09 18:55:17
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3562/core Modified Files: database_api.php Log Message: add an api to get the total query time Index: database_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/database_api.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- database_api.php 30 Nov 2004 11:00:49 -0000 1.37 +++ database_api.php 9 Dec 2004 18:55:06 -0000 1.38 @@ -366,6 +366,19 @@ } return $t_unique_queries; } + + # -------------------- + # get total time for queries + function db_time_queries () { + global $g_queries_array; + $t_count = count( $g_queries_array ); + $t_total = 0; + for ( $i = 0; $i < $t_count; $i++ ) { + $t_total += $g_queries_array[$i][1]; + } + return $t_total; + } + # -------------------- if ( !isset( $g_skip_open_db ) ) { |