Enabling Rclone elapsed time stats to display upto 2 decimals

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

Rclone currently display the time stats upto 1 decimal. Is there anyway to enable the elapsed time stats to display upto 2 decimals.

Run the command 'rclone version' and share the full output of the command.

rclone v1.64.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-164-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.1
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

s3 compatible storage

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Executing Download: time ./rclone -P copy "dctest62:dc/test_1G_10.dat" /tmp/"1G/"
Transferred:            1 GiB / 1 GiB, 100%, 73.121 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:        14.9s

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Paste config here

A log from the command that you were trying to run with the -vv flag

Paste  log here

So your ask is to make

Something like 14.95s ?

Hi.. Yes. That's right

I gotta ask. Why? What does that extra decimal change for you?

Certainly @Animosity022 . I wanted to see how fast the uploads are for small files!!! Right now, i am seeing for all 1kB, 10KB or 100KB files, the elapsed times are 0.0 sec or 0.1sec ..which i believe, it should not be the case.

Can you share an example? We've had numerous discussions/challenges/issues with the stats display so want to make sure you aren't hitting one of those.

@Animosity022 Please find below the sample tests i have done..

Executing: ./rclone copy "1K/" "dctest62:test/" --transfers "1"

Executing Download: time ./rclone -P copy "dctest62:test/test_1K_1.dat" /tmp/"1K/"
Transferred:            1 KiB / 1 KiB, 100%, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         0.0s

real    0m0.194s
user    0m0.135s
sys     0m0.082s

Executing: ./rclone copy "10K/" "dctest62:test/" --transfers "1"

Executing Download: time ./rclone -P copy "dctest62:test/test_10K_1.dat" /tmp/"10K/"
Transferred:           10 KiB / 10 KiB, 100%, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         0.0s

real    0m0.161s
user    0m0.100s
sys     0m0.067s

Executing: ./rclone copy "1M/" "dctest62:test/" --transfers "1"

Executing Download: time ./rclone -P copy "dctest62:test/test_1M_1.dat" /tmp/"1M/"
Transferred:            1 MiB / 1 MiB, 100%, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         0.0s

real    0m0.184s
user    0m0.142s
sys     0m0.052s

Executing: ./rclone copy "10M/" "dctest62:test/" --transfers "1"

Executing Download: time ./rclone -P copy "dctest62:test/test_10M_1.dat" /tmp/"10M/"
Transferred:           10 MiB / 10 MiB, 100%, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         0.1s

real    0m0.266s
user    0m0.175s
sys     0m0.099s

If you add --use-json-log you'll get the elapsedTime as a floating point number of seconds.

{"level":"info","msg":"\nTransferred:   \t   48.379 MiB / 48.379 MiB, 100%, 0 B/s, ETA -\nTransferred:            1 / 1, 100%\nElapsed time:         0.1s\n\n","source":"accounting/stats.go:512","stats":{"bytes":50728960,"checks":0,"deletedDirs":0,"deletes":0,"elapsedTime":0.152828474,"errors":0,"eta":null,"fatalError":false,"renames":0,"retryError":false,"serverSideCopies":0,"serverSideCopyBytes":0,"serverSideMoveBytes":0,"serverSideMoves":0,"speed":0,"totalBytes":50728960,"totalChecks":0,"totalTransfers":1,"transferTime":0.100878502,"transfers":1},"time":"2023-10-19T09:52:58.810429+01:00"}

Which run through jq looks like

{
  "level": "info",
  "msg": "\nTransferred:   \t   48.379 MiB / 48.379 MiB, 100%, 0 B/s, ETA -\nTransferred:            1 / 1, 100%\nElapsed time:         0.1s\n\n",
  "source": "accounting/stats.go:512",
  "stats": {
    "bytes": 50728960,
    "checks": 0,
    "deletedDirs": 0,
    "deletes": 0,
    "elapsedTime": 0.152828474,
    "errors": 0,
    "eta": null,
    "fatalError": false,
    "renames": 0,
    "retryError": false,
    "serverSideCopies": 0,
    "serverSideCopyBytes": 0,
    "serverSideMoveBytes": 0,
    "serverSideMoves": 0,
    "speed": 0,
    "totalBytes": 50728960,
    "totalChecks": 0,
    "totalTransfers": 1,
    "transferTime": 0.100878502,
    "transfers": 1
  },
  "time": "2023-10-19T09:52:58.810429+01:00"
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.