Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Path.stat benchmark #630

Merged
merged 1 commit into from
Oct 9, 2023
Merged

Add Path.stat benchmark #630

merged 1 commit into from
Oct 9, 2023

Conversation

talex5
Copy link
Collaborator

@talex5 talex5 commented Oct 8, 2023

This is @patricoferris's benchmark from #599, updated to use the new rmtree. I also added a semaphore to limit the number of concurrent operations, since it was otherwise failing with Unix_error (Too many open files, "openat2", "").

This is currently much faster with eio_linux than with eio_posix, probably due to the inefficient way we handle sandboxing there, so this will be a useful benchmark for fixing that.

For me, creation takes 2.1s with uring and 18.8s with posix; stat takes 1.3s with uring and 9.2s with posix. Using with_open_dir might further speed up the uring version.

Note: this currently defines with_tmp_dir and uses Path.native_exn dir |> Filename.basename, which might be better in Eio itself.

Part of #450.

@talex5 talex5 added the enhancement New feature or request label Oct 8, 2023
Co-authored-by: Thomas Leonard <talex5@gmail.com>
@talex5 talex5 merged commit 669c2e8 into ocaml-multicore:main Oct 9, 2023
4 of 5 checks passed
@talex5 talex5 deleted the bench-stat branch October 9, 2023 16:49
@talex5 talex5 mentioned this pull request Oct 9, 2023
talex5 added a commit to talex5/opam-repository that referenced this pull request Nov 2, 2023
CHANGES:

New features / API changes:

- Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin).

- Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin).

- Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin).

- Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625).

- Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626).

- Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm).

- Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm).
  This is a minimal initial version.

Documentation:

- Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621).

- Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling).

Build and test changes:

- Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616).

- Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630).

- eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629).

- Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5).

- Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632).

- Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631).

- Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615).

- Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
talex5 added a commit to talex5/opam-repository that referenced this pull request Nov 2, 2023
CHANGES:

New features / API changes:

- Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin).

- Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin).

- Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin).

- Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625).

- Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626).

- Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm).

- Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm).
  This is a minimal initial version.

Documentation:

- Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621).

- Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling).

Build and test changes:

- Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616).

- Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630).

- eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629).

- Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5).

- Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632).

- Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631).

- Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615).

- Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

New features / API changes:

- Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin).

- Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin).

- Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin).

- Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625).

- Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626).

- Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm).

- Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm).
  This is a minimal initial version.

Documentation:

- Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621).

- Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling).

Build and test changes:

- Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616).

- Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630).

- eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629).

- Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5).

- Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632).

- Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631).

- Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615).

- Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants