Cargo.toml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [package]
  2. name = "bench"
  3. version = "0.1.0"
  4. edition = "2021"
  5. publish = false
  6. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  7. [features]
  8. default = ["parking_lot"]
  9. # These feature flags can be disabled if we don't want to run comparison
  10. # benchmarks, such as when just comparing two `thingbuf` versions.
  11. comparisons = ["crossbeam", "async-std", "futures", "tokio-sync", "std-sync"]
  12. tokio-sync = ["tokio/sync"]
  13. std-sync = []
  14. # Use parking_lot mutexes in `thingbuf`
  15. parking_lot = ["thingbuf/parking_lot"]
  16. [dependencies]
  17. thingbuf = { path = ".." }
  18. criterion = { version = "0.3.5", features = ["async_tokio"] }
  19. # for comparison benchmarks
  20. tokio = { version = "1.14.0", features = ["rt", "rt-multi-thread", "sync", "parking_lot"] }
  21. crossbeam = { version = "0.8.1", optional = true }
  22. async-std = { version = "1", optional = true }
  23. futures = { version = "0.3", optional = true }
  24. [[bench]]
  25. name = "sync_spsc"
  26. harness = false
  27. [[bench]]
  28. name = "async_mpsc"
  29. harness = false
  30. [[bench]]
  31. name = "async_spsc"
  32. harness = false