sapling/eden
Zhengchao Liu b93c23d25c assign FS events to sampling groups
Summary:
As title, sampling group determines the sampling rate at which an FS event is logged. The higher the sampling group the more heavily its events are dropped, thus, more frequent events are assigned to the higher sampling groups.
I ran activity recorders on a few workflows, buck build, getdepts, and vscode editing and came up with the following assignment. Note that only a subset of events are assigned to a sampling group (so events not included will not be logged) as we just start to tune the sampling rates and these events should be good for a start.
```
Group1 (1/10)
FUSE_MKDIR
FUSE_RMDIR
FUSE_CREATE
FUSE_RENAME

Group2 (1/100)
FUSE_WRITE
FUSE_LISTXATTR
FUSE_SETATTR

Group3 (1/1000)
FUSE_GETXATTR
FUSE_GETATTR
FUSE_READ
FUSE_READDIR

Group4 (1/10000)
FUSE_LOOKUP
```

For reference, here are the counts of FS events of a cold buck build. The frequencies of other workflows are similar.
```
FUSE_LOOKUP 60.09 98733
FUSE_READ 12.80 21037
FUSE_GETXATTR 8.91 14645
FUSE_FORGET 8.01 13162
FUSE_GETATTR 5.55 9116
FUSE_READDIR 3.21 5270
FUSE_LISTXATTR 0.59 969
FUSE_READLINK 0.54 892
FUSE_STATFS 0.21 338
FUSE_WRITE 0.04 64
FUSE_CREATE 0.02 28
FUSE_RENAME 0.01 23
FUSE_SETATTR 0.01 13
FUSE_UNLINK 0.00 6
FUSE_RMDIR 0.00 1
FUSE_MKDIR 0.00 1
FUSE_MKNOD 0.00 1
```

Reviewed By: xavierd

Differential Revision: D30770533

fbshipit-source-id: 90be881ddbeba2113bbb190bdb1e300a68f500a0
2021-09-08 11:40:22 -07:00
..
fs assign FS events to sampling groups 2021-09-08 11:40:22 -07:00
hg-server Daily common/rust/cargo_from_buck/bin/autocargo 2021-09-08 03:36:02 -07:00
integration add json option to version 2021-08-30 22:12:15 -07:00
locale
mononoke edenapi_service: automatically compress EdenApiHandler responses 2021-09-08 11:33:19 -07:00
scm add logging of client information 2021-09-08 11:27:37 -07:00
test_support test_support: canonicalize the temporary directory path 2021-08-16 16:08:45 -07:00
test-data fix fsck snapshot integration tests 2021-07-14 16:20:04 -07:00
.gitignore
Eden.project.toml