diff --git a/src/daemon/PhutilDaemon.php b/src/daemon/PhutilDaemon.php --- a/src/daemon/PhutilDaemon.php +++ b/src/daemon/PhutilDaemon.php @@ -101,14 +101,15 @@ $this->emitOverseerMessage(self::MESSAGETYPE_HEARTBEAT, null); if ($this->traceMemory) { - $memuse = number_format(memory_get_usage() / 1024, 1); $daemon = get_class($this); fprintf( STDERR, "<%s> %s %s\n", '', $daemon, - pht('Memory Usage: %d KB', $memuse)); + pht( + 'Memory Usage: %s KB', + new PhutilNumber(memory_get_usage() / 1024, 1))); } } diff --git a/src/daemon/PhutilDaemonHandle.php b/src/daemon/PhutilDaemonHandle.php --- a/src/daemon/PhutilDaemonHandle.php +++ b/src/daemon/PhutilDaemonHandle.php @@ -273,8 +273,11 @@ private function updateMemory() { if ($this->traceMemory) { - $memuse = number_format(memory_get_usage() / 1024, 1); - $this->logMessage('RAMS', pht('Overseer Memory Usage: %d KB', $memuse)); + $this->logMessage( + 'RAMS', + pht( + 'Overseer Memory Usage: %s KB', + new PhutilNumber(memory_get_usage() / 1024, 1))); } } diff --git a/src/future/exec/CommandException.php b/src/future/exec/CommandException.php --- a/src/future/exec/CommandException.php +++ b/src/future/exec/CommandException.php @@ -61,7 +61,7 @@ $len = strlen($string); if ($len > $limit) { $cut = $len - $limit; - $suffix = pht('... (%d more bytes) ...', number_format($cut)); + $suffix = pht('... (%s more bytes) ...', new PhutilNumber($cut)); if ($cut > strlen($suffix)) { $string = substr($string, 0, $limit).$suffix; } diff --git a/src/moduleutils/PhutilLibraryMapBuilder.php b/src/moduleutils/PhutilLibraryMapBuilder.php --- a/src/moduleutils/PhutilLibraryMapBuilder.php +++ b/src/moduleutils/PhutilLibraryMapBuilder.php @@ -431,7 +431,7 @@ $this->log(pht('Finding source files...')); $source_map = $this->loadSourceFileMap(); $this->log( - pht('Found %s files.', number_format(count($source_map)))); + pht('Found %s files.', new PhutilNumber(count($source_map)))); // Load the symbol cache with existing parsed symbols. This allows us // to remap libraries quickly by analyzing only changed files. @@ -459,7 +459,7 @@ $futures[$file] = $this->buildSymbolAnalysisFuture($file); } $this->log( - pht('Found %d files in cache.', number_format(count($symbol_map)))); + pht('Found %s files in cache.', new PhutilNumber(count($symbol_map)))); // Run the analyzer on any files which need analysis. if ($futures) {