Changeset View
Changeset View
Standalone View
Standalone View
src/unit/renderer/ArcanistUnitConsoleRenderer.php
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | final class ArcanistUnitConsoleRenderer extends ArcanistUnitRenderer { | ||||
| } | } | ||||
| private function formatTestDuration($seconds) { | private function formatTestDuration($seconds) { | ||||
| // Very carefully define inclusive upper bounds on acceptable unit test | // Very carefully define inclusive upper bounds on acceptable unit test | ||||
| // durations. Times are in milliseconds and are in increasing order. | // durations. Times are in milliseconds and are in increasing order. | ||||
| $star = "\xE2\x98\x85"; | $star = "\xE2\x98\x85"; | ||||
| if (phutil_is_windows()) { | if (phutil_is_windows()) { | ||||
| // Fall-back to normal asterisk for Windows consoles. | // Fall-back to normal asterisk for Windows consoles. | ||||
| $star = "*"; | $star = '*'; | ||||
| } | } | ||||
| $acceptableness = array( | $acceptableness = array( | ||||
| 50 => "<fg:green>%s</fg><fg:yellow>{$star}</fg> ", | 50 => "<fg:green>%s</fg><fg:yellow>{$star}</fg> ", | ||||
| 200 => '<fg:green>%s</fg> ', | 200 => '<fg:green>%s</fg> ', | ||||
| 500 => '<fg:yellow>%s</fg> ', | 500 => '<fg:yellow>%s</fg> ', | ||||
| INF => '<fg:red>%s</fg> ', | INF => '<fg:red>%s</fg> ', | ||||
| ); | ); | ||||
| Show All 29 Lines | |||||