move from iostream to print
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <gpu.hpp>
|
||||
#include <iostream>
|
||||
#include <print>
|
||||
#include <string>
|
||||
#include <utils.hpp>
|
||||
|
||||
@@ -89,11 +89,10 @@ GpuMetricsHeader_t getGpuMetricsHeader(std::string path) {
|
||||
std::ifstream f(path, std::ios::binary);
|
||||
if (f.good()) {
|
||||
f.read(reinterpret_cast<char *>(&header), sizeof(header));
|
||||
std::cout << "[GpuMetrics] header at path " + path + " read, GpuMetrics_v" << std::to_string(header.format_revision) << "_" << std::to_string(header.content_revision);
|
||||
std::cout << ", size " << std::to_string(header.structure_size) << std::endl;
|
||||
std::println("[GpuMetrics] header at path {} read, GpuMetrics_v{}_{}, size {}", path, header.format_revision, header.content_revision, header.structure_size);
|
||||
f.close();
|
||||
} else {
|
||||
std::cerr << "[GpuMetrics] error reading header at path " + path + " (wrong card # ?)" << std::endl;
|
||||
std::println("[GpuMetrics] error reading header at path {} (wrong card # ?)", path); // should be err
|
||||
}
|
||||
|
||||
return header;
|
||||
@@ -109,7 +108,7 @@ auto getGpuMetrics(GpuMetricsHeader_t h, std::string path) {
|
||||
f.close();
|
||||
}
|
||||
} else {
|
||||
std::cout << "[GpuMetrics] read failed, unsupported format" << std::endl;
|
||||
std::println("[GpuMetrics] read failed, unsupported format");
|
||||
}
|
||||
|
||||
return metrics;
|
||||
|
||||
Reference in New Issue
Block a user