xaizek / etabench (License: GPLv3) (since 2022-09-08)
Benchmark for algorithms that compute I/O ETA
Commit 8f791b4108ddc458c3b1faf5cd5c437d30d63822

Improve Exponential algorithm a bit
Author: xaizek
Author date (UTC): 2022-12-30 18:28
Committer name: xaizek
Committer date (UTC): 2022-12-30 18:28
Parent(s): 96f7062694a44926b9b0a2d77f09f29224010c6d
Signing key: 99DC5E4DB05F6BE2
Tree: 7d0eec967dcf9bce3bfbb16e566fb3e18bc0029a
File Lines added Lines deleted
src/algs.cpp 2 3
File src/algs.cpp changed (mode: 100644) (index 4f218e8..f158a85)
... ... ExponentialAlg::estimate(int current, int total, int time)
540 540 if (lastProgress == 0) { if (lastProgress == 0) {
541 541 // If first invocation, initialize the estimate. // If first invocation, initialize the estimate.
542 542 rateEst = rate; rateEst = rate;
543 lastProgress = current;
544 return 0;
545 543 } else { } else {
546 544 float weight = std::exp(-dt/decay); float weight = std::exp(-dt/decay);
547 545 rateEst = rateEst*weight + rate*(1.0f - weight); rateEst = rateEst*weight + rate*(1.0f - weight);
548 eta = (1.0f - 1.0f*current/total)/rateEst;
549 546 } }
550 547
548 eta = (1.0f - 1.0f*current/total)/rateEst;
549
551 550 lastProgress = current; lastProgress = current;
552 551 lastTime = time; lastTime = time;
553 552 lastEta = eta; lastEta = eta;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/etabench

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/etabench

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master