diff --git a/includes/classes/Command.php b/includes/classes/Command.php index b2f9eb51e..2cd77ba8e 100644 --- a/includes/classes/Command.php +++ b/includes/classes/Command.php @@ -1335,9 +1335,11 @@ public function index_output( $message, $args, $index_meta, $context ) { $time_elapsed = Utility::timer_stop( 2 ); WP_CLI::log( WP_CLI::colorize( '%Y' . esc_html__( 'Time elapsed: ', 'elasticpress' ) . '%N' . Utility::timer_format( $time_elapsed ) . $time_elapsed_diff ) ); - $current_memory = round( memory_get_usage() / 1024 / 1024, 2 ) . 'mb'; - $peak_memory = ' (Peak: ' . round( memory_get_peak_usage() / 1024 / 1024, 2 ) . 'mb)'; - WP_CLI::log( WP_CLI::colorize( '%Y' . esc_html__( 'Memory Usage: ', 'elasticpress' ) . '%N' . $current_memory . $peak_memory ) ); + $current_memory = memory_get_usage() / 1024 / 1024; + $current_memory = ( $current_memory > 1000 ) ? round( $current_memory / 1024, 2 ) . 'gb' : round( $current_memory, 2 ) . 'mb'; + $peak_memory = memory_get_peak_usage() / 1024 / 1024; + $peak_memory = ( $peak_memory > 1000 ) ? round( $peak_memory / 1024, 2 ) . 'gb' : round( $peak_memory, 2 ) . 'mb'; + WP_CLI::log( WP_CLI::colorize( '%Y' . esc_html__( 'Memory Usage: ', 'elasticpress' ) . '%N' . $current_memory . ' (Peak: ' . $peak_memory . ')' ) ); } } } diff --git a/includes/classes/IndexHelper.php b/includes/classes/IndexHelper.php index be01d9725..1b44a3791 100644 --- a/includes/classes/IndexHelper.php +++ b/includes/classes/IndexHelper.php @@ -726,11 +726,11 @@ function( $item ) { $summary = sprintf( /* translators: 1. Indexable type 2. Offset start, 3. Offset end, 4. Found items 5. Last object ID */ - esc_html__( 'Processed %1$s %2$d - %3$d of %4$d. Last Object ID: %5$d', 'elasticpress' ), + esc_html__( 'Processed %1$s %2$s - %3$s of %4$s. Last Object ID: %5$d', 'elasticpress' ), esc_html( strtolower( $indexable->labels['plural'] ) ), - $this->index_meta['from'], - $this->index_meta['offset'], - $this->index_meta['found_items'], + number_format( $this->index_meta['from'] ), + number_format( $this->index_meta['offset'] ), + number_format( $this->index_meta['found_items'] ), $this->index_meta['current_sync_item']['last_processed_object_id'] ); diff --git a/includes/classes/REST/Sync.php b/includes/classes/REST/Sync.php index 41280bddd..7b348d754 100644 --- a/includes/classes/REST/Sync.php +++ b/includes/classes/REST/Sync.php @@ -190,10 +190,10 @@ public function get_sync_status( \WP_REST_Request $request ) { [ 'message' => sprintf( /* translators: 1. Number of objects indexed, 2. Total number of objects, 3. Last object ID. */ - esc_html__( 'Processed %1$d/%2$d. Last Object ID: %3$d', 'elasticpress' ), - $index_meta['offset'], - $index_meta['found_items'], - $index_meta['current_sync_item']['last_processed_object_id'] + esc_html__( 'Processed %1$s/%2$s. Last Object ID: %3$s', 'elasticpress' ), + number_format( $index_meta['offset'] ), + number_format( $index_meta['found_items'] ), + number_format( $index_meta['current_sync_item']['last_processed_object_id'] ) ), 'index_meta' => $index_meta, ] diff --git a/includes/partials/stats-page.php b/includes/partials/stats-page.php index 6a63ca0ac..3993aef04 100644 --- a/includes/partials/stats-page.php +++ b/includes/partials/stats-page.php @@ -84,7 +84,7 @@

-

+