Visit project on GitHub
Set theme to dark

denoflare analytics r2

Dump R2 stats via the Cloudflare GraphQL Analytics API

--help

$ denoflare analytics r2 --help
denoflare-analytics-r2 0.5.2

Dump R2 stats via the Cloudflare GraphQL Analytics API

USAGE:
    denoflare analytics r2 [OPTIONS]

OPTIONS:
    --bucket <name>        Filter to single R2 bucket
    --start <yyyy-mm-dd>   Start of the analysis range (inclusive)
    --end <yyyy-mm-dd>     End of the analysis range (inclusive)
    --budget               If set, dump GraphQL API request budget
                           
    --config <path>        Path to config file (default: .denoflare in cwd or parents)
    --profile <name>       Explicit profile to use from config file
    --account-id <string>  Explicit Cloudflare account id to use for authentication
    --api-token <string>   Explicit Cloudflare API token to use for authentication
                           
    --help                 Print help information
    --verbose              Toggle verbose output (when applicable)

Example output

$ dfd analytics r2 --start 2022-04-27 --end 2022-05-25

      date  class.a         class.b           egress         storage         total.cost
2022-04-27       67  $0.00       12  $0.00  1.0000gb  $0.00   4.58gb  $0.00       $0.00
2022-04-28       18  $0.00       18  $0.00  0.0000gb  $0.00   1.02gb  $0.00       $0.00
2022-04-30      642  $0.00        4  $0.00  0.0000gb  $0.00   5.62gb  $0.00       $0.01
2022-05-01      505  $0.00        0  $0.00  0.0000gb  $0.00   5.28gb  $0.00       $0.00
2022-05-09       14  $0.00        4  $0.00  0.0000gb  $0.00   1.77gb  $0.00       $0.00
2022-05-10      199  $0.00       68  $0.00  0.0184gb  $0.00  28.27gb  $0.01       $0.02
2022-05-11      424  $0.00      423  $0.00  0.0013gb  $0.00  28.27gb  $0.01       $0.02
2022-05-12      245  $0.00      389  $0.00  0.0000gb  $0.00  28.27gb  $0.01       $0.02
2022-05-13        0  $0.00        8  $0.00  0.0000gb  $0.00  28.27gb  $0.01       $0.01
2022-05-14       12  $0.00       14  $0.00  0.0000gb  $0.00  28.27gb  $0.01       $0.01
2022-05-15       11  $0.00        0  $0.00  0.0000gb  $0.00  28.27gb  $0.01       $0.01
2022-05-16        5  $0.00        4  $0.00  0.0000gb  $0.00  28.27gb  $0.01       $0.01
2022-05-17       14  $0.00        3  $0.00  0.0000gb  $0.00  58.66gb  $0.03       $0.03
2022-05-18       97  $0.00       52  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-19      129  $0.00       93  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-20       94  $0.00      139  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-21      114  $0.00      136  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-22       82  $0.00       57  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-23       65  $0.00       50  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-24      151  $0.00      147  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
2022-05-25       51  $0.00       91  $0.00  0.0000gb  $0.00  58.68gb  $0.03       $0.03
                                                                                       
     total     2939  $0.01     1712  $0.00  1.0197gb  $0.00           $0.37       $0.39
est 30-day     4332  $0.02     2432  $0.00  1.5296gb  $0.00           $0.51       $0.53
minus free           $0.00           $0.00            $0.00           $0.36       $0.36

per bucket:
 cost  storage  objects    egress  bucket 
$0.23  33.73gb       16  1.0000gb  beta   
$0.13  22.87gb      815  0.0000gb  epsilon
$0.02   2.01gb       25  0.0000gb  delta  
$0.01   0.00gb       93  0.0017gb  iota   
$0.00   0.02gb       11  0.0000gb  theta  
$0.00   0.00gb        2  0.0000gb  zeta   
$0.00   0.05gb       10  0.0180gb  kappa  
$0.00   0.00gb        2  0.0000gb  nu     
$0.00   0.00gb        0  0.0000gb  gamma  
$0.00   0.00gb        1  0.0000gb  alpha  
$0.00   0.00gb        0  0.0000gb  eta    
$0.00   0.00gb        0  0.0000gb  lambda 
$0.00   0.00gb        0  0.0000gb  mu