mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
fix: Incorrect rounding in execution time counter (#1899)
* fix: Incorrect rounding in execution time counter * Update page_footer.php
This commit is contained in:
parent
14086a0ed6
commit
781b7240c4
5 changed files with 7 additions and 7 deletions
|
@ -35,7 +35,7 @@ if (!$bb_cfg['gzip_compress']) {
|
|||
|
||||
if ($show_dbg_info) {
|
||||
$gen_time = utime() - TIMESTART;
|
||||
$gen_time_txt = sprintf('%.4f', $gen_time);
|
||||
$gen_time_txt = sprintf('%.3f', $gen_time);
|
||||
$gzip_text = UA_GZIP_SUPPORTED ? "{$lang['GZIP_COMPRESSION']}: " : "<s>{$lang['GZIP_COMPRESSION']}:</s> ";
|
||||
$gzip_text .= $bb_cfg['gzip_compress'] ? $lang['ON'] : $lang['OFF'];
|
||||
|
||||
|
@ -43,7 +43,7 @@ if ($show_dbg_info) {
|
|||
|
||||
if (!empty($DBS)) {
|
||||
$sql_t = $DBS->sql_timetotal;
|
||||
$sql_time_txt = ($sql_t) ? sprintf('%.4f ' . $lang['SEC'] . ' (%d%%) · ', $sql_t, round($sql_t * 100 / $gen_time)) : '';
|
||||
$sql_time_txt = ($sql_t) ? sprintf('%.3f ' . $lang['SEC'] . ' (%d%%) · ', $sql_t, round($sql_t * 100 / $gen_time)) : '';
|
||||
$num_q = $DBS->num_queries;
|
||||
$stat .= " | {$DBS->get_db_obj()->engine}: {$sql_time_txt}{$num_q} " . $lang['QUERIES'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue