inspect tenant=5
----
empty state

create-tenant tenant=5
----

inspect tenant=5
----
empty state

configure tenant=5
available_tokens: 1000
refill_rate: 100
max_burst_tokens: 5000
----

inspect tenant=5
----
Bucket state: token-burst-limit=5000  token-refill-rate=100  token-current=1000  token-current-avg=0
Consumption: ru=0 kvru=0  reads=0 in 0 batches (0 bytes)  writes=0 in 0 batches (0 bytes)  pod-cpu-usage: 0 secs  pgwire-egress=0 bytes  external-egress=0 bytes  external-ingress=0 bytes  estimated-cpu: 0 secs
Rates: write-batches=0,0  estimated-cpu=0,0
Last update: 00:00:00.000
First active instance: 0

token-bucket-request tenant=5
instance_id: 1
consumption:
  ru: 10
  kvru: 10
  read_batches: 2
  read_req: 20
  read_bytes: 30
  write_batches: 2
  write_req: 40
  write_bytes: 50
  sql_pods_cpu_seconds: 60
  pgwire_egress_bytes: 70
----

inspect tenant=5
----
Bucket state: token-burst-limit=5000  token-refill-rate=100  token-current=1000  token-current-avg=250
Consumption: ru=10 kvru=10  reads=20 in 2 batches (30 bytes)  writes=40 in 2 batches (50 bytes)  pod-cpu-usage: 60 secs  pgwire-egress=70 bytes  external-egress=0 bytes  external-ingress=0 bytes  estimated-cpu: 0 secs
Rates: write-batches=0,0.2  estimated-cpu=0,0
Last update: 00:00:00.000
First active instance: 1
  Instance 1:  lease="foo"  seq=1  next-instance=0  last-update=00:00:00.000

advance
1m
----
00:01:00.000

configure tenant=5
available_tokens: 2000
refill_rate: 100
----

inspect tenant=5
----
Bucket state: token-burst-limit=0  token-refill-rate=100  token-current=2000  token-current-avg=250
Consumption: ru=10 kvru=10  reads=20 in 2 batches (30 bytes)  writes=40 in 2 batches (50 bytes)  pod-cpu-usage: 60 secs  pgwire-egress=70 bytes  external-egress=0 bytes  external-ingress=0 bytes  estimated-cpu: 0 secs
Rates: write-batches=0,0.2  estimated-cpu=0,0
Last update: 00:01:00.000
First active instance: 1
  Instance 1:  lease="foo"  seq=1  next-instance=0  last-update=00:00:00.000
