example
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp   |     multilevel
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w  |    top   in  read
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+----------+------------------
    0 |   101   102B     0B     101 | 103.0 |  104B |   112   104B |   113   106B |   221   217B |  107B |   1  2.1 |  104B  104B  104B
    1 |   201   202B     0B     201 | 203.0 |  204B |   212   204B |   213   206B |   421   417B |  207B |   2  2.0 |  204B  204B  204B
    2 |   301   302B     0B     301 | 303.0 |  304B |   312   304B |   313   306B |   621   617B |  307B |   3  2.0 |  304B  304B  304B
    3 |   401   402B     0B     401 | 403.0 |  404B |   412   404B |   413   406B |   821   817B |  407B |   4  2.0 |  404B  404B  404B
    4 |   501   502B     0B     501 | 503.0 |  504B |   512   504B |   513   506B |  1.0K  1017B |  507B |   5  2.0 |  504B  504B  504B
    5 |   601   602B     0B     601 | 603.0 |  604B |   612   604B |   613   606B |  1.2K  1.2KB |  607B |   6  2.0 |  604B  604B  604B
    6 |   701   702B     0B     701 |     - |  704B |   712   704B |   713   706B |  1.4K  1.4KB |  707B |   7  2.0 |  704B  704B  704B
total |  2.8K  2.7KB     0B    2.8K |     - | 2.8KB |  2.9K  2.8KB |  2.9K  2.8KB |  5.7K  8.4KB | 2.8KB |  28  3.0 | 2.8KB 2.8KB 2.8KB
---------------------------------------------------------------------------------------------------------------------------------------
WAL: 22 files (24B)  in: 25B  written: 26B (4% overhead)
Flushes: 8
Compactions: 5  estimated debt: 6B  in progress: 2 (7B)
             default: 27  delete: 28  elision: 29  move: 30  read: 31  tombstone-density: 16  rewrite: 32  copy: 33  multi-level: 34
MemTables: 12 (11B)  zombie: 14 (13B)
Zombie tables: 16 (15B, local: 30B)
Backing tables: 1 (2.0MB)
Virtual tables: 2807 (2.8KB)
Local tables size: 28B
Compression types:
Block cache: 2 entries (1B)  hit rate: 42.9%
Table cache: 18 entries (17B)  hit rate: 48.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 4  earliest seq num: 1024
Table iters: 21
Filter utility: 47.4%
Ingestions: 27  as flushable: 36 (34B in 35 tables)
Cgo memory usage: 15KB  block cache: 9.0KB (data: 4.0KB, maps: 2.0KB, entries: 3.0KB)  memtables: 5.0KB

init
----

batch
set a 1
----

iter-new a category=a qos=non-latency
----

flush
----
L0.0:
  000005:[a#10,SET-a#10,SET]

# iter b references both a memtable and sstable 5.

iter-new b category=b qos=latency
----

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     1   589B     0B       0 |  0.25 |   28B |     0     0B |     0     0B |     1   589B |    0B |   1 21.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     0     0B     0B       0 |     - |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
total |     1   589B     0B       0 |     - |   28B |     0     0B |     0     0B |     1   617B |    0B |   1 22.0
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 17B  written: 28B (65% overhead)
Flushes: 1
Compactions: 0  estimated debt: 0B  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 589B
Compression types: snappy: 1
Block cache: 2 entries (716B)  hit rate: 0.0%
Table cache: 1 entries (760B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 1
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}

disk-usage
----
2.0KB

batch
set b 2
----

flush
----
L0.0:
  000005:[a#10,SET-a#10,SET]
  000007:[b#11,SET-b#11,SET]

# iter c references both a memtable and sstables 5 and 7.

iter-new c category=c qos=non-latency
----

compact a-z
----
L6:
  000008:[a#0,SET-b#0,SET]

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |   56B |     0     0B |     0     0B |     2  1.2KB |    0B |   0 21.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   595B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   595B | 1.2KB |   1  0.5
total |     1   595B     0B       0 |     - |   56B |     0     0B |     0     0B |     3  1.8KB | 1.2KB |   1 32.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 34B  written: 56B (65% overhead)
Flushes: 2
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 2 (512KB)
Zombie tables: 2 (1.2KB, local: 1.2KB)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 595B
Compression types: snappy: 1
Block cache: 2 entries (716B)  hit rate: 33.3%
Table cache: 2 entries (1.5KB)  hit rate: 66.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 2
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   c, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:88 BlockBytesInCache:44 BlockReadDuration:10ms}

disk-usage
----
3.3KB

# Closing iter a will release one of the zombie memtables.

iter-close a
----

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |   56B |     0     0B |     0     0B |     2  1.2KB |    0B |   0 21.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   595B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   595B | 1.2KB |   1  0.5
total |     1   595B     0B       0 |     - |   56B |     0     0B |     0     0B |     3  1.8KB | 1.2KB |   1 32.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 34B  written: 56B (65% overhead)
Flushes: 2
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 2 (512KB)
Zombie tables: 2 (1.2KB, local: 1.2KB)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 595B
Compression types: snappy: 1
Block cache: 2 entries (716B)  hit rate: 33.3%
Table cache: 2 entries (1.5KB)  hit rate: 66.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 2
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   c, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:88 BlockBytesInCache:44 BlockReadDuration:10ms}

# Closing iter c will release one of the zombie sstables. The other
# zombie sstable is still referenced by iter b.

iter-close c
----

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |   56B |     0     0B |     0     0B |     2  1.2KB |    0B |   0 21.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   595B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   595B | 1.2KB |   1  0.5
total |     1   595B     0B       0 |     - |   56B |     0     0B |     0     0B |     3  1.8KB | 1.2KB |   1 32.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 34B  written: 56B (65% overhead)
Flushes: 2
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 2 (512KB)
Zombie tables: 1 (589B, local: 589B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 595B
Compression types: snappy: 1
Block cache: 2 entries (716B)  hit rate: 33.3%
Table cache: 1 entries (760B)  hit rate: 66.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 1
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:88 BlockBytesInCache:44 BlockReadDuration:10ms}

disk-usage
----
2.8KB

# Closing iter b will release the last zombie sstable and the last zombie memtable.

iter-close b
----

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |   56B |     0     0B |     0     0B |     2  1.2KB |    0B |   0 21.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   595B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   595B | 1.2KB |   1  0.5
total |     1   595B     0B       0 |     - |   56B |     0     0B |     0     0B |     3  1.8KB | 1.2KB |   1 32.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 34B  written: 56B (65% overhead)
Flushes: 2
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 595B
Compression types: snappy: 1
Block cache: 0 entries (0B)  hit rate: 33.3%
Table cache: 0 entries (0B)  hit rate: 66.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:88 BlockBytesInCache:44 BlockReadDuration:10ms}

disk-usage
----
2.2KB

additional-metrics
----
block bytes written:
 __level___data-block__value-block
      0          54B           0B
      1           0B           0B
      2           0B           0B
      3           0B           0B
      4           0B           0B
      5           0B           0B
      6          33B           0B

batch
set c@20 c20
set c@19 c19
set c@18 c18
set c@17 c17
set c@16 c16
set c@15 c15
set c@14 c14
----

flush
----
L0.0:
  000010:[c@20#12,SET-c@18#14,SET]
  000011:[c@17#15,SET-c@15#17,SET]
  000012:[c@14#18,SET-c@14#18,SET]
L6:
  000008:[a#0,SET-b#0,SET]

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     3  2.0KB    38B       0 |  0.25 |  149B |     0     0B |     0     0B |     5  3.2KB |    0B |   1 21.8
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   595B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   595B | 1.2KB |   1  0.5
total |     4  2.6KB    38B       0 |     - |  149B |     0     0B |     0     0B |     6  3.9KB | 1.2KB |   2 26.8
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 116B  written: 149B (28% overhead)
Flushes: 3
Compactions: 1  estimated debt: 2.6KB  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 2.6KB
Compression types: snappy: 4
Block cache: 0 entries (0B)  hit rate: 33.3%
Table cache: 0 entries (0B)  hit rate: 66.7%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:88 BlockBytesInCache:44 BlockReadDuration:10ms}

additional-metrics
----
block bytes written:
 __level___data-block__value-block
      0         198B          38B
      1           0B           0B
      2           0B           0B
      3           0B           0B
      4           0B           0B
      5           0B           0B
      6          33B           0B

compact a-z
----
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |  149B |     0     0B |     0     0B |     5  3.2KB |    0B |   0 21.8
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     3  2.0KB    41B       0 |     - | 3.2KB |     0     0B |     0     0B |     3  2.0KB | 3.2KB |   1  0.6
total |     3  2.0KB    41B       0 |     - |  149B |     0     0B |     0     0B |     8  5.3KB | 3.2KB |   1 36.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 116B  written: 149B (28% overhead)
Flushes: 3
Compactions: 2  estimated debt: 0B  in progress: 0 (0B)
             default: 2  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 2.0KB
Compression types: snappy: 3
Block cache: 0 entries (0B)  hit rate: 14.3%
Table cache: 0 entries (0B)  hit rate: 58.3%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms}

additional-metrics
----
block bytes written:
 __level___data-block__value-block
      0         198B          38B
      1           0B           0B
      2           0B           0B
      3           0B           0B
      4           0B           0B
      5           0B           0B
      6         143B          41B

# Flushable ingestion metrics. This requires there be data in a memtable that
# would overlap with the ingested table(s). Delayed flushes are disabled here to
# prevent the ingestion from immediately triggering a flush of the memtable.
# Instead, we wish to flush manually _after_ the ingestion of the two tables has
# completed, linking the two tables into the flushable queue.

delay-flush
enable
----

batch
set d d
set e e
set f f
----

build ext1.sst
set d d
----

build ext2.sst
set e e
----

ingest ext1.sst ext2.sst
----

build ext3.sst
set f f
----

ingest ext3.sst
----

delay-flush
disable
----

flush
----
L0.1:
  000015:[d#22,SET-d#22,SET]
  000016:[e#23,SET-e#23,SET]
  000019:[f#24,SET-f#24,SET]
L0.0:
  000023:[d#19,SET-f#21,SET]
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]

# We expect the ingested-as-flushable count to be three (one for each ingested
# table). The unknown category in the iter category stats is because of a gap
# in instrumentation for checking overlap with an existing flushable ingest,
# where we open and close a point iterator when constructing a range-del
# iterator.
metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     4  2.3KB     0B       0 |  0.50 |  187B |     3  1.7KB |     0     0B |     6  3.8KB |    0B |   2 20.6
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     3  2.0KB    41B       0 |     - | 3.2KB |     0     0B |     0     0B |     3  2.0KB | 3.2KB |   1  0.6
total |     7  4.3KB    41B       0 |     - | 1.9KB |     3  1.7KB |     0     0B |     9  7.7KB | 3.2KB |   3  4.0
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 176B  written: 187B (6% overhead)
Flushes: 8
Compactions: 2  estimated debt: 4.3KB  in progress: 0 (0B)
             default: 2  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (1.0MB)  zombie: 1 (1.0MB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 4.3KB
Compression types: snappy: 7
Block cache: 8 entries (2.8KB)  hit rate: 9.1%
Table cache: 1 entries (760B)  hit rate: 53.8%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 2  as flushable: 2 (1.7KB in 3 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms}
       pebble-ingest,     latency: {BlockBytes:64 BlockBytesInCache:0 BlockReadDuration:10ms}

batch
set g g
set h h
set i i
set j j
set k k
set l l
set m m
----

flush
----
L0.1:
  000015:[d#22,SET-d#22,SET]
  000016:[e#23,SET-e#23,SET]
  000019:[f#24,SET-f#24,SET]
L0.0:
  000023:[d#19,SET-f#21,SET]
  000025:[g#25,SET-i#27,SET]
  000026:[j#28,SET-l#30,SET]
  000027:[m#31,SET-m#31,SET]
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]

metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     7  4.1KB     0B       0 |  0.50 |  245B |     3  1.7KB |     0     0B |     9  5.5KB |    0B |   2 23.1
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     3  2.0KB    41B       0 |     - | 3.2KB |     0     0B |     0     0B |     3  2.0KB | 3.2KB |   1  0.6
total |    10  6.1KB    41B       0 |     - | 2.0KB |     3  1.7KB |     0     0B |    12  9.5KB | 3.2KB |   3  4.8
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 223B  written: 245B (10% overhead)
Flushes: 9
Compactions: 2  estimated debt: 6.1KB  in progress: 0 (0B)
             default: 2  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (1.0MB)  zombie: 1 (1.0MB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 6.1KB
Compression types: snappy: 10
Block cache: 8 entries (2.8KB)  hit rate: 9.1%
Table cache: 1 entries (760B)  hit rate: 53.8%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 2  as flushable: 2 (1.7KB in 3 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms}
       pebble-ingest,     latency: {BlockBytes:64 BlockBytesInCache:0 BlockReadDuration:10ms}

build ext1
set z z
----

ingest-and-excise ext1 excise=i-k
----

# sstable 29, 30 were created as virtual when i-k was excised.
lsm
----
L0.1:
  000015:[d#22,SET-d#22,SET]
  000016:[e#23,SET-e#23,SET]
  000019:[f#24,SET-f#24,SET]
L0.0:
  000023:[d#19,SET-f#21,SET]
  000029(000025):[g#25,SET-h#26,SET]
  000030(000026):[k#29,SET-l#30,SET]
  000027:[m#31,SET-m#31,SET]
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]
  000028:[z#33,SET-z#33,SET]

# There should be 2 backing tables. Note that tiny sstables have inaccurate
# virtual sstable sizes.
metrics-value
num-backing
backing-size
num-virtual
num-virtual 0
virtual-size
----
2
1.2KB
2
2
102B

metrics zero-cache-hits-misses
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     7  3.0KB     0B       2 |  0.50 |  245B |     3  1.7KB |     0     0B |     9  5.5KB |    0B |   2 23.1
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     4  2.6KB    41B       0 |     - | 3.2KB |     1   589B |     0     0B |     3  2.0KB | 3.2KB |   1  0.6
total |    11  5.6KB    41B       2 |     - | 2.5KB |     4  2.3KB |     0     0B |    12   10KB | 3.2KB |   3  4.0
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 223B  written: 245B (10% overhead)
Flushes: 9
Compactions: 2  estimated debt: 5.6KB  in progress: 0 (0B)
             default: 2  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (1.0MB)  zombie: 1 (1.0MB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 2 (1.2KB)
Virtual tables: 2 (102B)
Local tables size: 6.7KB
Compression types: snappy: 9 unknown: 2
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 0 entries (0B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 3  as flushable: 2 (1.7KB in 3 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:301 BlockBytesInCache:44 BlockReadDuration:60ms}
       pebble-ingest,     latency: {BlockBytes:200 BlockBytesInCache:0 BlockReadDuration:30ms}

# Virtualize a virtual sstable.
build ext1
set zz zz
----

ingest-and-excise ext1 excise=k-l
----

# sstable 32 created when k-l was excised, but no new backing file should be
# created.
lsm
----
L0.1:
  000015:[d#22,SET-d#22,SET]
  000016:[e#23,SET-e#23,SET]
  000019:[f#24,SET-f#24,SET]
L0.0:
  000023:[d#19,SET-f#21,SET]
  000029(000025):[g#25,SET-h#26,SET]
  000032(000026):[l#30,SET-l#30,SET]
  000027:[m#31,SET-m#31,SET]
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]
  000028:[z#33,SET-z#33,SET]
  000031:[zz#35,SET-zz#35,SET]

metrics-value
num-backing
backing-size
num-virtual
num-virtual 0
virtual-size
----
2
1.2KB
2
2
102B

compact a-z
----
L6:
  000008:[a#0,SET-b#0,SET]
  000013:[c@20#0,SET-c@16#0,SET]
  000014:[c@15#0,SET-c@14#0,SET]
  000033:[d#0,SET-m#0,SET]
  000028:[z#33,SET-z#33,SET]
  000031:[zz#35,SET-zz#35,SET]

# Virtual sstables metrics should be gone after the compaction.
metrics-value
num-backing
backing-size
num-virtual
num-virtual 0
virtual-size
----
0
0B
0
0
0B

metrics zero-cache-hits-misses
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |  245B |     3  1.7KB |     0     0B |     9  5.5KB |    0B |   0 23.1
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     6  3.8KB    41B       0 |     - | 6.2KB |     2  1.2KB |     0     0B |     4  2.6KB | 6.2KB |   1  0.4
total |     6  3.8KB    41B       0 |     - | 3.1KB |     5  2.9KB |     0     0B |    13   11KB | 6.2KB |   1  3.6
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 223B  written: 245B (10% overhead)
Flushes: 9
Compactions: 3  estimated debt: 0B  in progress: 0 (0B)
             default: 3  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (1.0MB)  zombie: 1 (1.0MB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 3.8KB
Compression types: snappy: 6
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 0 entries (0B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 4  as flushable: 2 (1.7KB in 3 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
                   a, non-latency: {BlockBytes:0 BlockBytesInCache:0 BlockReadDuration:0s}
                   b,     latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms}
                   c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s}
   pebble-compaction, non-latency: {BlockBytes:677 BlockBytesInCache:376 BlockReadDuration:70ms}
       pebble-ingest,     latency: {BlockBytes:272 BlockBytesInCache:72 BlockReadDuration:30ms}

# Create a DB where lower levels are written as shared tables. All ingests also
# become shared tables.
init shared-lower
----

batch
set a 1
set b 1
set c 1
----

flush
----
L0.0:
  000005:[a#10,SET-c#12,SET]

# One local table.
metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     1   604B     0B       0 |  0.25 |   38B |     0     0B |     0     0B |     1   604B |    0B |   1 15.9
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     0     0B     0B       0 |     - |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
total |     1   604B     0B       0 |     - |   38B |     0     0B |     0     0B |     1   642B |    0B |   1 16.9
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 27B  written: 38B (41% overhead)
Flushes: 1
Compactions: 0  estimated debt: 0B  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 604B
Compression types: snappy: 1
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 0 entries (0B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B

compact a-z
----
L6:
  000006:[a#10,SET-c#12,SET]

# Table becomes shared, so local table size becomes 0.
metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |   38B |     0     0B |     0     0B |     1   604B |    0B |   0 15.9
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   604B     0B       0 |     - |  604B |     0     0B |     0     0B |     1   604B |    0B |   1  1.0
total |     1   604B     0B       0 |     - |   38B |     0     0B |     0     0B |     2  1.2KB |    0B |   1 32.8
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 27B  written: 38B (41% overhead)
Flushes: 1
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 1  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 0B
Compression types: snappy: 1
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 1 entries (760B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B

build ext1.sst
set b 2
----

ingest ext1.sst
----

lsm
----
L0.0:
  000007:[b#13,SET-b#13,SET]
L6:
  000006:[a#10,SET-c#12,SET]

# Ingest is also shared table, so local table size stays 0.
metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     1   589B     0B       0 |  0.25 |   38B |     1   589B |     0     0B |     1   604B |    0B |   1 15.9
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   604B     0B       0 |     - |  604B |     0     0B |     0     0B |     1   604B |    0B |   1  1.0
total |     2  1.2KB     0B       0 |     - |  627B |     1   589B |     0     0B |     2  1.8KB |    0B |   2  2.9
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 27B  written: 38B (41% overhead)
Flushes: 1
Compactions: 1  estimated debt: 1.2KB  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 1  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 0B
Compression types: snappy: 2
Block cache: 4 entries (1.4KB)  hit rate: 0.0%
Table cache: 1 entries (760B)  hit rate: 50.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 1  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
       pebble-ingest,     latency: {BlockBytes:59 BlockBytesInCache:0 BlockReadDuration:10ms}

batch
set b 3
----

flush
----
L0.1:
  000009:[b#14,SET-b#14,SET]
L0.0:
  000007:[b#13,SET-b#13,SET]
L6:
  000006:[a#10,SET-c#12,SET]

# Local table size increases due to flush.
metrics
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     2  1.2KB     0B       0 |  0.50 |   66B |     1   589B |     0     0B |     2  1.2KB |    0B |   2 18.1
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   604B     0B       0 |     - |  604B |     0     0B |     0     0B |     1   604B |    0B |   1  1.0
total |     3  1.7KB     0B       0 |     - |  655B |     1   589B |     0     0B |     3  2.4KB |    0B |   3  3.7
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 44B  written: 66B (50% overhead)
Flushes: 2
Compactions: 1  estimated debt: 1.7KB  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 1  multi-level: 0
MemTables: 1 (256KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 589B
Compression types: snappy: 3
Block cache: 4 entries (1.4KB)  hit rate: 0.0%
Table cache: 1 entries (760B)  hit rate: 50.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 1  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
       pebble-ingest,     latency: {BlockBytes:59 BlockBytesInCache:0 BlockReadDuration:10ms}

# Reopen DB, to ensure stats are consistent. Also, reopened DB is not
# configured to write shared tables.
init reopen
----

metrics zero-cache-hits-misses
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     2  1.2KB     0B       0 |  0.50 |    0B |     0     0B |     0     0B |     0     0B |    0B |   2  0.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   604B     0B       0 |     - |    0B |     0     0B |     0     0B |     0     0B |    0B |   1  0.0
total |     3  1.7KB     0B       0 |     - |    0B |     0     0B |     0     0B |     0     0B |    0B |   3  0.0
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 0B  written: 0B (0% overhead)
Flushes: 1
Compactions: 0  estimated debt: 1.7KB  in progress: 0 (0B)
             default: 0  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (512KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 589B
Compression types: snappy: 3
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 0 entries (0B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B

compact a-z
----
L6:
  000014:[a#0,SET-c#0,SET]

# All tables are local after compaction.
metrics zero-cache-hits-misses
----
      |                             |       |       |   ingested   |     moved    |    written   |       |    amp
level | tables  size val-bl vtables | score |   in  | tables  size | tables  size | tables  size |  read |   r   w
------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+---------
    0 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    1 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    2 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    3 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    4 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    5 |     0     0B     0B       0 |  0.00 |    0B |     0     0B |     0     0B |     0     0B |    0B |   0  0.0
    6 |     1   603B     0B       0 |     - | 1.2KB |     0     0B |     0     0B |     1   603B | 1.7KB |   1  0.5
total |     1   603B     0B       0 |     - |    0B |     0     0B |     0     0B |     1   603B | 1.7KB |   1  0.0
-------------------------------------------------------------------------------------------------------------------
WAL: 1 files (0B)  in: 0B  written: 0B (0% overhead)
Flushes: 1
Compactions: 1  estimated debt: 0B  in progress: 0 (0B)
             default: 1  delete: 0  elision: 0  move: 0  read: 0  tombstone-density: 0  rewrite: 0  copy: 0  multi-level: 0
MemTables: 1 (512KB)  zombie: 1 (256KB)
Zombie tables: 0 (0B, local: 0B)
Backing tables: 0 (0B)
Virtual tables: 0 (0B)
Local tables size: 603B
Compression types: snappy: 1
Block cache: 0 entries (0B)  hit rate: 0.0%
Table cache: 0 entries (0B)  hit rate: 0.0%
Secondary cache: 0 entries (0B)  hit rate: 0.0%
Snapshots: 0  earliest seq num: 0
Table iters: 0
Filter utility: 0.0%
Ingestions: 0  as flushable: 0 (0B in 0 tables)
Cgo memory usage: 0B  block cache: 0B (data: 0B, maps: 0B, entries: 0B)  memtables: 0B
Iter category stats:
   pebble-compaction, non-latency: {BlockBytes:147 BlockBytesInCache:0 BlockReadDuration:30ms}
