Skip to content

Commit

Permalink
Remove extra newline in benchmark results
Browse files Browse the repository at this point in the history
  • Loading branch information
Oipo committed Oct 28, 2024
1 parent 7ffe58e commit ba354fa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions benchmarks/coroutine_benchmark/ichor_coroutine_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} coroutines/s\n", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} coroutines/s", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * EVENT_COUNT));
}

Expand All @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} coroutines/s\n",
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} coroutines/s",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * EVENT_COUNT * 8.));
}
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/event_benchmark/ichor_event_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<TestService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_WARN)}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} events/s\n",argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} events/s",argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * EVENT_COUNT));
}

Expand Down Expand Up @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} events/s\n",
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} events/s",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * EVENT_COUNT * 8.));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<TestService>();
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded glaze ran for {:L} µs with {:L} peak memory usage {:L} MB/s\n", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
fmt::println("{} single threaded glaze ran for {:L} µs with {:L} peak memory usage {:L} MB/s", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * SERDE_COUNT * static_cast<double>(sizeof_test) / 1'000'000.));
}

Expand All @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded glaze ran for {:L} µs with {:L} peak memory usage {:L} MB/s\n",
fmt::println("{} multi threaded glaze ran for {:L} µs with {:L} peak memory usage {:L} MB/s",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * SERDE_COUNT * threadCount * static_cast<double>(sizeof_test) / 1'000'000.));
}
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/start_benchmark/ichor_start_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {
}
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded advanced injection ran for {:L} µs with {:L} peak memory usage\n", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
fmt::println("{} single threaded advanced injection ran for {:L} µs with {:L} peak memory usage", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
}

if(!singleOnly) {
Expand All @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded advanced injection ran for {:L} µs with {:L} peak memory usage\n",
fmt::println("{} multi threaded advanced injection ran for {:L} µs with {:L} peak memory usage",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
}
}
Expand All @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) {
}
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded constructor injection ran for {:L} µs with {:L} peak memory usage\n", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
fmt::println("{} single threaded constructor injection ran for {:L} µs with {:L} peak memory usage", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
}

if(!singleOnly) {
Expand All @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded constructor injection ran for {:L} µs with {:L} peak memory usage\n",
fmt::println("{} multi threaded constructor injection ran for {:L} µs with {:L} peak memory usage",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) {
dm.createServiceManager<StartStopService>(Properties{{"LogLevel", Ichor::make_any<LogLevel>(LogLevel::LOG_INFO)}});
queue->start(CaptureSigInt);
auto end = std::chrono::steady_clock::now();
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} start & stop /s\n", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
fmt::println("{} single threaded ran for {:L} µs with {:L} peak memory usage {:L} start & stop /s", argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * START_STOP_COUNT));
}

Expand All @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
threads[i].join();
}
auto end = std::chrono::steady_clock::now();
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} start & stop /s\n",
fmt::println("{} multi threaded ran for {:L} µs with {:L} peak memory usage {:L} start & stop /s",
argv[0], std::chrono::duration_cast<std::chrono::microseconds>(end - start).count(), getPeakRSS(),
std::floor(1'000'000. / static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(end - start).count()) * START_STOP_COUNT * 8.));
}
Expand Down

0 comments on commit ba354fa

Please sign in to comment.