Skip to content

rapid-metrics: Use fsnotifywatch to gather filesystem statistics - #3651

Open
badboy wants to merge 3 commits into
mainfrom
ability-to-delay-ping-lifetime/tuqzuzkxvlks
Open

badboy wants to merge 3 commits into
mainfrom
ability-to-delay-ping-lifetime/tuqzuzkxvlks

Conversation

@badboy

@badboy badboy commented Sep 22, 2026

Copy link
Copy Markdown
Member

Uses fsnotifywatch for some statistics to compare rkv/sqlite and delay-ping-lifetime-io

Output like:

    Finished `release` profile [optimized + debuginfo] target(s) in 0.06s
===== Full write mode (Rkv) =====
target/release/rapid-metrics --maxn 10000 --seed 100 /tmp/glean_rapid_metrics.l6IRqgKAnC
Establishing watches...
Finished establishing watches, now collecting statistics.
total  modify  close_write  open  moved_from  moved_to  create  delete  filename
102333  25588   25588        25588  25585       0         25585   0       /tmp/glean_rapid_metrics.l6IRqgKAnC/db/data.safe.tmp (deleted)
25585  0       0            0     0           25585     0       0       /tmp/glean_rapid_metrics.l6IRqgKAnC/db/data.safe.bin
1      0       0            0     0           0         1       0       /tmp/glean_rapid_metrics.l6IRqgKAnC/pending_pings
1      0       0            0     0           0         1       0       /tmp/glean_rapid_metrics.l6IRqgKAnC/tmp
1      0       0            0     0           0         0       1       /tmp/glean_rapid_metrics.l6IRqgKAnC/pending_pings/66ecdac9-ad85-4384-af16-87e17173dd92 (deleted)

===== delay-ping-lifetime mode (Rkv) =====
target/release/rapid-metrics --maxn 10000 --seed 100 /tmp/glean_rapid_metrics.P08YlTv9ea --delay
Establishing watches...
Finished establishing watches, now collecting statistics.
total  modify  close_write  open  moved_from  moved_to  create  delete  filename
22991  5753    5753         5753  5753        0         5753    0       /tmp/glean_rapid_metrics.P08YlTv9ea/db/data.safe.tmp
5753   0       0            0     0           5753      0       0       /tmp/glean_rapid_metrics.P08YlTv9ea/db/data.safe.bin
1      0       0            0     0           0         1       0       /tmp/glean_rapid_metrics.P08YlTv9ea/pending_pings
1      0       0            0     0           0         1       0       /tmp/glean_rapid_metrics.P08YlTv9ea/tmp
1      0       0            0     0           0         0       1       /tmp/glean_rapid_metrics.P08YlTv9ea/pending_pings/949b6af2-16ff-4501-b0f3-7196c7efde23 (deleted)

    Finished `release` profile [optimized + debuginfo] target(s) in 0.06s
===== Full write mode (SQLite) =====
target/release/rapid-metrics --maxn 10000 --seed 100 /tmp/glean_rapid_metrics.UbKKXVgtPn
Establishing watches...
Finished establishing watches, now collecting statistics.
total  access  modify  close_write  close_nowrite  open  create  delete  filename
24330  177     24149   1            0              1     1       1       /tmp/glean_rapid_metrics.UbKKXVgtPn/db/glean.sqlite-wal
218    2       216     1            0              0     0       0       /tmp/glean_rapid_metrics.UbKKXVgtPn/db/glean.sqlite
5      0       2       1            0              1     1       1       /tmp/glean_rapid_metrics.UbKKXVgtPn/db/glean.sqlite-shm
3      0       1       1            0              1     1       0       /tmp/glean_rapid_metrics.UbKKXVgtPn/client_id.txt
2      0       0       1            0              0     0       1       /tmp/glean_rapid_metrics.UbKKXVgtPn/db/glean.sqlite-journal (deleted)
2      0       0       0            1              0     0       1       /tmp/glean_rapid_metrics.UbKKXVgtPn/pending_pings/37943311-b5a1-40f1-9e96-6336ddf36b09
1      0       0       0            0              0     1       0       /tmp/glean_rapid_metrics.UbKKXVgtPn/pending_pings
1      0       0       0            0              0     1       0       /tmp/glean_rapid_metrics.UbKKXVgtPn/tmp

===== delay-ping-lifetime mode (SQLite) =====
target/release/rapid-metrics --maxn 10000 --seed 100 /tmp/glean_rapid_metrics.jg6AsTmXrP --delay
Establishing watches...
Finished establishing watches, now collecting statistics.
total  access  modify  close_write  open  create  delete  filename
11243  83      11156   1            1     1       1       /tmp/glean_rapid_metrics.jg6AsTmXrP/db/glean.sqlite-wal
97     2       95      1            0     0       0       /tmp/glean_rapid_metrics.jg6AsTmXrP/db/glean.sqlite
8      0       5       1            1     1       1       /tmp/glean_rapid_metrics.jg6AsTmXrP/db/glean.sqlite-shm
3      0       1       1            1     1       0       /tmp/glean_rapid_metrics.jg6AsTmXrP/client_id.txt
2      0       1       1            0     0       1       /tmp/glean_rapid_metrics.jg6AsTmXrP/db/glean.sqlite-journal (deleted)
1      0       0       0            0     1       0       /tmp/glean_rapid_metrics.jg6AsTmXrP/pending_pings
1      0       0       0            0     1       0       /tmp/glean_rapid_metrics.jg6AsTmXrP/tmp
1      0       0       0            0     0       1       /tmp/glean_rapid_metrics.jg6AsTmXrP/pending_pings/630d5fe7-3623-4286-b70a-d381e6d140a7 (deleted)

Linux only.

@badboy
badboy force-pushed the ability-to-delay-ping-lifetime/tuqzuzkxvlks branch from fd1755e to 7be9f1b Compare September 22, 2026 13:30
@badboy
badboy force-pushed the ability-to-delay-ping-lifetime/tuqzuzkxvlks branch from 7be9f1b to ec9fcbd Compare September 25, 2026 14:38
@badboy
badboy marked this pull request as ready for review September 25, 2026 14:38
@badboy
badboy requested a review from a team as a code owner September 25, 2026 14:38
@badboy
badboy requested review from jeddai and removed request for a team September 25, 2026 14:38
@badboy

badboy commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

The script could use some work to make it easier to compare. But regardless I think this is worth landing already, for the rapid-metrics changes alone (I'm using them locally to test out things already)

This branch has not been deployed

No deployments
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