Present gc as ratio of time in gc to time in add or gc

This commit is contained in:
2024-03-03 20:53:29 -08:00
parent 10436096d1
commit b97f611a3c
+4 -4
View File
@@ -119,8 +119,8 @@ int main(int argc, const char **argv) {
close(fd);
}
printf("Check: %g seconds, %g MB/s, Add: %g seconds, %g MB/s, Gc: %g "
"seconds\n",
checkTime, checkBytes / checkTime * 1e-6, addTime,
addBytes / addTime * 1e-6, gcTime);
printf(
"Check: %g seconds, %g MB/s, Add: %g seconds, %g MB/s, Gc ratio: %g%%\n",
checkTime, checkBytes / checkTime * 1e-6, addTime,
addBytes / addTime * 1e-6, gcTime / (gcTime + addTime) * 1e2);
}