| 815 | //========================================================================== |
| 816 | |
| 817 | void FStepStats::Format(FString &out) |
| 818 | { |
| 819 | // Because everything in the default green is hard to distinguish, |
| 820 | // each stage has its own color. |
| 821 | for (int i = GC::GCS_Propagate; i < GC::GCS_Done; ++i) |
| 822 | { |
| 823 | int count = Count[i]; |
| 824 | double time = Clock[i].TimeMS(); |
| 825 | out.AppendFormat(TEXTCOLOR_ESCAPESTR "%c[%c%6zuK %4d*%.2fms]", |
| 826 | "-NKB"[i], /* Color codes */ |
| 827 | "-PSD"[i], /* Stage prefixes: (P)ropagate, (S)weep, (D)estroy */ |
| 828 | (BytesCovered[i] + 1023) >> 10, count, count != 0 ? time / count : time); |
| 829 | } |
| 830 | out << TEXTCOLOR_GREEN; |
| 831 | } |
| 832 | |
| 833 | //========================================================================== |
| 834 | // |