e-dant / watcher

Filesystem watcher. Works anywhere. Simple, efficient and friendly.
MIT License
639 stars 32 forks source link

Performance Tests #5

Closed e-dant closed 3 months ago

e-dant commented 1 year ago

We need performance benchmarks against the other filesystem watchers. I'm thinking:

We have performance tests, but they're not comparative.

e-dant commented 1 year ago

Depending on whether or not some of the other libraries are multithreaded, this might require pinning cpu cores for reliable metrics. I'm not sure how to do that on Windows, but on systems that use posix threads there's an affinity option that might work for this. It's not clear how that will work for Chokidar, though. I think taskset (program) and Grub ('s config file) could be used for that on Linux distros.

e-dant commented 1 year ago

These tests could measure the latency between:

  1. a filesystem event, and
  2. the event being reported by these watchers

The first could be a simple bash script.

The second could be storing the event, and its timestamp, then writing it out to a file.

The events could be some set number of different kinds of events and path types: Create, modify, move, remove; Files and directories.

The events could be created some set number of times and some set interval. Similar things are done in this library's unit tests.

fabiospampinato commented 1 year ago

It may be worth measuring also how long it takes to watch a big folder, and how much memory that takes.

e-dant commented 1 year ago

It may be worth measuring also how long it takes to watch a big folder, and how much memory that takes.

Definitely.

I'm curious about different scenarios and profiling metrics.

Some parameters to tweak:

Some parameters to measure:

We'll get there :)

e-dant commented 3 months ago

I'm comfortable with our performance tests and valgrind