@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make everything 1000x or 1000000x slower

Summary:
In the great `pht()` conversion, some strings like "123,456" are now being printed as numbers with "%d". These come out as "123" instead of "123,456".

Use "%s" and "PhutilNumber" to present numbers with comma groupings.

Test Plan:
- Viewed DarkConsole.
- Viewed conduit logs.
- Viewed daemon logs.
- Grepped for `%d ms` and `%d us`.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D12979

+9 -7
+1 -1
src/applications/conduit/controller/PhabricatorConduitLogController.php
··· 98 98 array($call->getMethod(), $client), 99 99 $status, 100 100 $call->getError(), 101 - pht('%d us', number_format($call->getDuration())), 101 + pht('%s us', new PhutilNumber($call->getDuration())), 102 102 phabricator_datetime($call->getDateCreated(), $viewer), 103 103 ); 104 104 }
+5 -3
src/applications/console/plugin/DarkConsoleServicesPlugin.php
··· 198 198 $summary[] = array( 199 199 $type, 200 200 number_format($counts[$type]), 201 - pht('%d us', number_format((int)(1000000 * $totals[$type]))), 201 + pht('%s us', new PhutilNumber((int)(1000000 * $totals[$type]))), 202 202 sprintf('%.1f%%', 100 * $totals[$type] / $page_total), 203 203 ); 204 204 } ··· 258 258 break; 259 259 } 260 260 261 + $offset = ($row['begin'] - $data['start']); 262 + 261 263 $rows[] = array( 262 264 $row['type'], 263 - pht('+%d ms', number_format(1000 * ($row['begin'] - $data['start']))), 264 - pht('%d us', number_format(1000000 * $row['duration'])), 265 + pht('+%s ms', new PhutilNumber(1000 * $offset)), 266 + pht('%s us', new PhutilNumber(1000000 * $row['duration'])), 265 267 $info, 266 268 $analysis, 267 269 );
+1 -1
src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
··· 50 50 $rows[] = array( 51 51 $class, 52 52 number_format($info['n']), 53 - pht('%d us', number_format((int)($info['duration'] / $info['n']))), 53 + pht('%s us', new PhutilNumber((int)($info['duration'] / $info['n']))), 54 54 ); 55 55 } 56 56
+1 -1
src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
··· 141 141 $expires); 142 142 143 143 if ($task->isArchived()) { 144 - $duration = pht('%d us', number_format($task->getDuration())); 144 + $duration = pht('%s us', new PhutilNumber($task->getDuration())); 145 145 } else { 146 146 $duration = phutil_tag('em', array(), pht('Not Completed')); 147 147 }
+1 -1
src/applications/herald/query/HeraldTranscriptSearchEngine.php
··· 125 125 } 126 126 $item->addAttribute($handles[$xscript->getObjectPHID()]->renderLink()); 127 127 $item->addAttribute( 128 - pht('%d ms', number_format((int)(1000 * $xscript->getDuration())))); 128 + pht('%s ms', new PhutilNumber((int)(1000 * $xscript->getDuration())))); 129 129 $item->addIcon( 130 130 'none', 131 131 phabricator_datetime($xscript->getTime(), $viewer));