Skip to content

Commit 22186b2

Browse files
committed
add uasort logging
1 parent 9325810 commit 22186b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

admin/class-boldgrid-backup-admin-core.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,10 @@ public function get_filelist( $dirpath ) {
14471447
}
14481448

14491449
// Sort the dirlist array by filename.
1450+
static $uasort_total_time = 0;
1451+
1452+
$uasort_time_start = microtime( true );
1453+
14501454
uasort(
14511455
$dirlist,
14521456
function ( $a, $b ) {
@@ -1462,6 +1466,12 @@ function ( $a, $b ) {
14621466
}
14631467
);
14641468

1469+
$uasort_time_end = microtime( true );
1470+
1471+
$uasort_total_time += ( $uasort_time_end - $uasort_time_start );
1472+
1473+
$this->logger->add( 'uasort Duration: ' . $uasort_total_time );
1474+
14651475
// Perform conversion.
14661476
foreach ( $dirlist as $fileinfo ) {
14671477
// If item is a directory, then recurse, merge, and continue.

0 commit comments

Comments
 (0)