Skip to content

Commit bdb4b63

Browse files
tjgqcopybara-github
authored andcommitted
Choose the most appropriate unit for disk cache GC bytes/second.
PiperOrigin-RevId: 884367353 Change-Id: I5feaed4b401fc3fb9637d3470917fa8838317a2e
1 parent b7b2134 commit bdb4b63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/google/devtools/build/lib/remote/disk/DiskCacheGarbageCollector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,17 @@ public record CollectionStats(
130130
public String displayString() {
131131
double elapsedSeconds = elapsedTime.toSecondsPart() + elapsedTime.toMillisPart() / 1000.0;
132132
int filesPerSecond = (int) Math.round((double) deletedEntries / elapsedSeconds);
133-
int mbPerSecond = (int) Math.round((deletedBytes / (1024.0 * 1024.0)) / elapsedSeconds);
133+
int bytesPerSecond = (int) Math.round((double) deletedBytes / elapsedSeconds);
134134

135-
return "Deleted %d of %d files, reclaimed %s of %s in %.2f seconds (%d files/s, %d MB/s)%s"
135+
return "Deleted %d of %d files, reclaimed %s of %s in %.2f seconds (%d files/s, %s/s)%s"
136136
.formatted(
137137
deletedEntries(),
138138
totalEntries(),
139139
bytesCountToDisplayString(deletedBytes()),
140140
bytesCountToDisplayString(totalBytes()),
141141
elapsedSeconds,
142142
filesPerSecond,
143-
mbPerSecond,
143+
bytesCountToDisplayString(bytesPerSecond),
144144
concurrentUpdate() ? " (concurrent update detected)" : "");
145145
}
146146
}

0 commit comments

Comments
 (0)