mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Utilities: Use ElapsedTimer::start_new() in disk_bechmark
This commit is contained in:
parent
a2ee387683
commit
74ee7cabf2
1 changed files with 2 additions and 4 deletions
|
@ -103,8 +103,7 @@ int main(int argc, char** argv)
|
||||||
Vector<Result> results;
|
Vector<Result> results;
|
||||||
|
|
||||||
outln("Running: file_size={} block_size={}", file_size, block_size);
|
outln("Running: file_size={} block_size={}", file_size, block_size);
|
||||||
Core::ElapsedTimer timer;
|
auto timer = Core::ElapsedTimer::start_new();
|
||||||
timer.start();
|
|
||||||
while (timer.elapsed() < time_per_benchmark * 1000) {
|
while (timer.elapsed() < time_per_benchmark * 1000) {
|
||||||
out(".");
|
out(".");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
@ -145,8 +144,7 @@ Optional<Result> benchmark(const String& filename, int file_size, int block_size
|
||||||
|
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
Core::ElapsedTimer timer;
|
auto timer = Core::ElapsedTimer::start_new();
|
||||||
timer.start();
|
|
||||||
|
|
||||||
ssize_t total_written = 0;
|
ssize_t total_written = 0;
|
||||||
for (ssize_t j = 0; j < file_size; j += block_size) {
|
for (ssize_t j = 0; j < file_size; j += block_size) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue