Commit Graph
9 Commits
Author SHA1 Message Date
Johannes Weiss 57d65ddf9c inEventLoop benchmark (#3301)
### Motivation:

PR #3297 is changing `inEventLoop` and `inEventLoop` is very much on the
perf path. So let's add a benchmark

### Modifications:

- Add `(!)inEventLoop` benchmark
- Fix a guaranteed deadlock in `TCPThroughputBenchmark` to make the
benchmarks runnable

### Result:

- More benchmarks
- Fewer hangs
2025-07-14 10:50:58 +00:00
George Barnett 4b7854daaa Strict concurrency for NIOPerformanceTester and NIOCrashTester (#3167) 2025-04-07 14:10:48 +00:00
Franz Busch c9756e1083 Adopt swift-format (#2794)
* Apply formatting

* Apply no block comments rule

* Apply OmitExplicitReturns

* Apple OnlyOneTrailingClosureArgument

* Apply NoAssignmentInExpressions

* Fix up DontRepeatTypeInStaticProperties lint errors

* Apply `OrderedImports`

* Apply `ReplaceForEachWithForLoop`

* format file

* Enable the formatting pipeline

* Adopt `AmbiguousTrailingClosureOverload`

* Fix license header

* Fix format check

* Fix `EndOfLineComment`

* Fix CI

* Adapt CI script to check if changes when running formatting

* Separate lint and format into to steps

* Fix format

* Adopt `UseEarlyExits`

* Revert "Adopt `UseEarlyExits`"

This reverts commit d1ac5bbe12.
2024-07-19 11:48:17 +02:00
Johannes Weiss 7948ed2104 ChannelHandler: provide static (un)wrap(In|Out)bound(In|Out) (#2791) 2024-07-18 11:55:48 +01:00
ser 196ceab4b2 Fix race in TCPThroughputBenchmark (#2724) 2024-05-20 09:52:05 -07:00
Franz BuschandCory Benfield 63e8c4e1aa Migrate to syncOperations in more places (#2661)
# Motivation

Adding a handler via the regular `pipeline.addHandler` APIs can lead to transferring the handler over isolation regions. To avoid running into `Sendable` warnings here we can use the `syncOperations` of the pipeline to avoid transferring the handlers.

# Modification

This PR is mostly changing code to avoid transferring handlers to and from the event loops in tests. This should be a no-op mostly.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-03-01 15:05:22 +00:00
Cory Benfield 54c85cb263 Fix thread-safety issues in TCPThroughputBenchmark (#2537)
Motivation:

Several thread-safety issues were missed in code review. This patch fixes them.

Modifications:

- Removed the use of an unstructured Task, replaced with eventLoop.execute to
  ServerHandler's EventLoop.
- Stopped ClientHandler reaching into the benchmark object without any
  synchronization, used promises and event loop hops instead.

Result:

Thread safety is back
2023-10-25 02:20:49 -07:00
George Barnett 734a0ba103 Add availability requirements to TCPThroughputBenchmark (#2368)
Motivation:

- Uses Concurrency but missing availability requirements; does not build
  on macOS.

Modifications:

- Add availability requirements/guards

Result:

Compiles on macOS
2023-02-16 11:55:14 +00:00
ser ab43dc6949 TCP channel throughput benchmark. (#2367)
* TCP channel throughput benchmark.

* Cosmetic fixes.

* Add license to the source code.
2023-02-15 16:00:10 +00:00