rust-vmm / event-manager

Apache License 2.0
46 stars 32 forks source link

File descriptor safety #116

Open JonathanWoollett-Light opened 1 year ago

JonathanWoollett-Light commented 1 year ago

Summary of the PR

Replaces RawFd with OwnedFds to ensure file descriptors are handled safely.

Benchmarks

process_basic           time:   [11.721 µs 11.739 µs 11.764 µs]
Found 16 outliers among 200 measurements (8.00%)
  10 (5.00%) high mild
  6 (3.00%) high severe

process_with_arc_mutex  time:   [13.959 µs 13.963 µs 13.968 µs]
Found 7 outliers among 200 measurements (3.50%)
  6 (3.00%) high mild
  1 (0.50%) high severe

process_with_inner_mut  time:   [12.488 µs 12.501 µs 12.516 µs]
Found 16 outliers among 200 measurements (8.00%)
  9 (4.50%) high mild
  7 (3.50%) high severe

process_dynamic_dispatch
                        time:   [24.849 µs 24.858 µs 24.867 µs]
Found 16 outliers among 200 measurements (8.00%)
  10 (5.00%) high mild
  6 (3.00%) high severe

process_dispatch_few_events
                        time:   [671.91 ns 672.21 ns 672.52 ns]
Found 10 outliers among 200 measurements (5.00%)
  2 (1.00%) low mild
  4 (2.00%) high mild
  4 (2.00%) high severe

Requirements

Before submitting your PR, please make sure you addressed the following requirements: