Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mypy + black+ruff and try to use --json-stats instead of the hard to parse logs #28

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

RonnyPfannschmidt
Copy link

@RonnyPfannschmidt RonnyPfannschmidt commented Nov 20, 2023

@RonnyPfannschmidt RonnyPfannschmidt changed the title add mypy + bacl and try to use --json-stats instead of the hard to parse logs add mypy + black+ruff and try to use --json-stats instead of the hard to parse logs Nov 20, 2023
@RonnyPfannschmidt
Copy link
Author

it seems tricky to test - im wondering about adding a docker config for a testing webdav/s3 type of server thats using rate limits

@RonnyPfannschmidt
Copy link
Author

after some investigation i learned, that progress details don't transfer, the only way to access them via api is to use the rc server

@RonnyPfannschmidt
Copy link
Author

scrap that, i just did the invocation wrong (testing on top of my netcloud dav)

$ rclone copyto --stats 0.1s --stats-unit bytes --use-json-log dav-ronny:SofortUpload/Camera/2021 ./test-down -v

has log lines that pretty print like:

{
    "level": "info",
    "msg": "\nTransferred:   \t    6.984 MiB / 1.598 GiB, 0%, 1.746 MiB/s, ETA 15m33s\nChecks:                32 / 32, 100%\nTransferred:            0 / 243, 0%\nElapsed time:         5.3s\nTransferring:\n *                    05/IMG_20210505_004616.jpg: 47% /4.233Mi, 681.047Ki/s, 3s\n *                    05/IMG_20210505_004620.jpg: 51% /3.905Mi, 681.311Ki/s, 2s\n *                    05/IMG_20210505_004625.jpg: 49% /4.011Mi, 509.849Ki/s, 4s\n *                    05/IMG_20210505_101246.jpg: 24% /4.119Mi, 509.848Ki/s, 6s\n\n",
    "source": "accounting/stats.go:482",
    "stats": {
        "bytes": 7323648,
        "checks": 32,
        "deletedDirs": 0,
        "deletes": 0,
        "elapsedTime": 5.376205461,
        "errors": 0,
        "eta": 933,
        "fatalError": false,
        "renames": 0,
        "retryError": false,
        "speed": 1830463.4627209443,
        "totalBytes": 1716074039,
        "totalChecks": 32,
        "totalTransfers": 243,
        "transferTime": 0,
        "transferring": [
            {
                "bytes": 2093056,
                "eta": 3,
                "group": "global_stats",
                "name": "05/IMG_20210505_004616.jpg",
                "percentage": 47,
                "size": 4438632,
                "speed": 602842.3845504231,
                "speedAvg": 697392.4997227154
            },
            {
                "bytes": 2093056,
                "eta": 2,
                "group": "global_stats",
                "name": "05/IMG_20210505_004620.jpg",
                "percentage": 51,
                "size": 4095147,
                "speed": 686821.3151093656,
                "speedAvg": 697662.1734824803
            },
            {
                "bytes": 2093056,
                "eta": 4,
                "group": "global_stats",
                "name": "05/IMG_20210505_004625.jpg",
                "percentage": 49,
                "size": 4205666,
                "speed": 783087.7730998808,
                "speedAvg": 522085.1812636596
            },
            {
                "bytes": 1044480,
                "eta": 6,
                "group": "global_stats",
                "name": "05/IMG_20210505_101246.jpg",
                "percentage": 24,
                "size": 4319047,
                "speed": 390779.1600049532,
                "speedAvg": 522084.7776772926
            }
        ],
        "transfers": 0
    },
    "time": "2023-11-28T10:29:43.731521+01:00"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant