# Count and periodically print number of S3 operations

**URL:** <https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700>\
**Category:** Feature\
**Created:** [October 25, 2022, 6:38am UTC](https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700 "2022-10-25T06:38:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![archon810](https://forum.rclone.org/user_avatar/forum.rclone.org/archon810/32/3476_2.png) [@archon810](https://forum.rclone.org/u/archon810)\
**Post date:** [October 25, 2022, 6:38am UTC](https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700/1 "2022-10-25T06:38:54Z")

</div>

I'm using Cloudflare R2, which charges per million Class A or Class B operations, and it'd be really nice to be able to estimate how much each rclone run will cost by printing the count of S3 operations (ideally split into class A and B, but for starters just the total) either periodically or on every operation (controlled by a flag).

> **[Pricing · Cloudflare R2 docs](https://developers.cloudflare.com/r2/platform/pricing/)**
>
> Store large amounts of unstructured data without egress fees.

|Class A Operations|1 million requests / month|$4.50 / million requests|  
|Class B Operations|10 million requests / month|$0.36 / million requests|

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 25, 2022, 9:22am UTC](https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700/2 "2022-10-25T09:22:54Z")

</div>

It would be fairly easy for rclone to count http transactions. We can already limit these per second so it would just be a single counter it the stats.

That would be useful for all backends.

Would that be useful to you?

---

<div class="post-metadata">

**Author:** ![archon810](https://forum.rclone.org/user_avatar/forum.rclone.org/archon810/32/3476_2.png) [@archon810](https://forum.rclone.org/u/archon810)\
**Post date:** [October 25, 2022, 7:18pm UTC](https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700/3 "2022-10-25T19:18:43Z")

</div>

If you can't separate them by classes for Cloudflare, then yeah, a single count would be handy regardless.

> ### [​​](https://developers.cloudflare.com/r2/platform/pricing/#class-a-operations)Class A operations
> 
> Class A Operations include `ListBuckets`, `PutBucket`, `ListObjects`, `PutObject`, `CopyObject`, `CompleteMultipartUpload`, `CreateMultipartUpload`, `ListMultipartUploads`, `UploadPart`, `UploadPartCopy` and `PutBucketEncryption`.
> 
> ### [​​](https://developers.cloudflare.com/r2/platform/pricing/#class-b-operations)Class B operations
> 
> Class B Operations include `HeadBucket`, `HeadObject`, `GetObject`, `UsageSummary`, `GetBucketEncryption` and `GetBucketLocation`.
> 
> ### [​​](https://developers.cloudflare.com/r2/platform/pricing/#free-operations)Free operations
> 
> Free operations include `DeleteObject`, `DeleteBucket` and `AbortMultipartUpload`.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [December 24, 2022, 7:19pm UTC](https://forum.rclone.org/t/count-and-periodically-print-number-of-s3-operations/33700/4 "2022-12-24T19:19:08Z")

</div>

Closed on December 24, 2022, 7:19pm UTC

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