From 51f2e7ed7ca229dad67570e859ccba12dbc938da Mon Sep 17 00:00:00 2001 From: David Addison Date: Mon, 3 Nov 2025 11:18:39 -0800 Subject: [PATCH] Remove trailing WS when timestamp option not used --- src/util.cu | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util.cu b/src/util.cu index 2bb76f9..1e4d283 100644 --- a/src/util.cu +++ b/src/util.cu @@ -617,14 +617,15 @@ testResult_t writeDeviceReport(size_t *maxMem, int localRank, int proc, int tota // Json results object and contained table list are left open void writeResultHeader(bool report_cputime, bool report_timestamps) { const char* tsLbl = report_timestamps ? "timestamp" : ""; + const int tsPad = report_timestamps ? 19 : 0; const char* tsFmt = report_timestamps ? TIME_STRING_FORMAT : ""; const char* timeStr = report_cputime ? "cputime" : "time"; PRINT("#\n"); PRINT("# %10s %12s %8s %6s %6s out-of-place in-place \n", "", "", "", "", ""); - PRINT("# %10s %12s %8s %6s %6s %7s %6s %6s %6s %7s %6s %6s %6s %20s\n", "size", "count", "type", "redop", "root", - timeStr, "algbw", "busbw", "#wrong", timeStr, "algbw", "busbw", "#wrong", tsLbl); - PRINT("# %10s %12s %8s %6s %6s %7s %6s %6s %6s %7s %6s %6s %6s %20s\n", "(B)", "(elements)", "", "", "", - "(us)", "(GB/s)", "(GB/s)", "", "(us)", "(GB/s)", "(GB/s)", "", tsFmt); + PRINT("# %10s %12s %8s %6s %6s %7s %6s %6s %6s %7s %6s %6s %6s %*s\n", "size", "count", "type", "redop", "root", + timeStr, "algbw", "busbw", "#wrong", timeStr, "algbw", "busbw", "#wrong", tsPad, tsLbl); + PRINT("# %10s %12s %8s %6s %6s %7s %6s %6s %6s %7s %6s %6s %6s %*s\n", "(B)", "(elements)", "", "", "", + "(us)", "(GB/s)", "(GB/s)", "", "(us)", "(GB/s)", "(GB/s)", "", tsPad, tsFmt); if(write_json) { jsonKey("results"); jsonStartList();