Full Code of scylladb/seastar for AI

master 1f05a334f72f cached
660 files
6.1 MB
1.6M tokens
10340 symbols
1 requests
Download .txt
Showing preview only (6,485K chars total). Download the full file or copy to clipboard to get everything.
Repository: scylladb/seastar
Branch: master
Commit: 1f05a334f72f
Files: 660
Total size: 6.1 MB

Directory structure:
gitextract_vjp23guz/

├── .clangd
├── .claude/
│   └── CLAUDE.md
├── .dockerignore
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── alpinelinux.yaml
│       ├── docker.yaml
│       ├── pre-commit.yaml
│       ├── python-lint.yaml
│       ├── test.yaml
│       └── tests.yaml
├── .gitignore
├── .gitmodules
├── .gitorderfile
├── .mailmap
├── .pre-commit-config.yaml
├── CMakeLists.txt
├── CONTRIBUTING.md
├── HACKING.md
├── LICENSE
├── NOTICE
├── README-DPDK.md
├── README.md
├── apps/
│   ├── CMakeLists.txt
│   ├── httpd/
│   │   ├── CMakeLists.txt
│   │   ├── demo.json
│   │   └── main.cc
│   ├── io_tester/
│   │   ├── CMakeLists.txt
│   │   ├── conf.yaml
│   │   ├── io_tester.cc
│   │   ├── ioinfo.cc
│   │   └── sched.yaml
│   ├── iotune/
│   │   ├── CMakeLists.txt
│   │   └── iotune.cc
│   ├── lib/
│   │   └── stop_signal.hh
│   ├── memcached/
│   │   ├── CMakeLists.txt
│   │   ├── ascii.rl
│   │   ├── memcache.cc
│   │   ├── memcached.hh
│   │   └── tests/
│   │       ├── CMakeLists.txt
│   │       ├── test.py
│   │       ├── test_ascii_parser.cc
│   │       └── test_memcached.py
│   ├── rpc_tester/
│   │   ├── CMakeLists.txt
│   │   ├── rpc_tester.cc
│   │   └── sample-conf.yaml
│   └── seawreck/
│       ├── CMakeLists.txt
│       └── seawreck.cc
├── cmake/
│   ├── CheckGcc107852.cmake
│   ├── CheckHeaders.cmake
│   ├── CheckIncludeStyle.cmake
│   ├── CheckLibc.cmake
│   ├── CheckP2582R1.cmake
│   ├── CxxModulesRules.cmake
│   ├── FindGnuTLS.cmake
│   ├── FindLibUring.cmake
│   ├── FindLinuxMembarrier.cmake
│   ├── FindPthreadSetName.cmake
│   ├── FindSanitizers.cmake
│   ├── FindStdAtomic.cmake
│   ├── FindSystemTap-SDT.cmake
│   ├── FindValgrind.cmake
│   ├── Findc-ares.cmake
│   ├── Finddpdk.cmake
│   ├── Findhwloc.cmake
│   ├── Findlksctp-tools.cmake
│   ├── Findlz4.cmake
│   ├── Findragel.cmake
│   ├── Findrt.cmake
│   ├── Finducontext.cmake
│   ├── Findyaml-cpp.cmake
│   ├── SeastarConfig.cmake.in
│   ├── SeastarDependencies.cmake
│   ├── TriStateOption.cmake
│   ├── check-seastar-include-style.py
│   └── code_tests/
│       ├── LinuxMembarrier_test.cc
│       ├── Sanitizers_fiber_test.cc
│       ├── Source_location_default_argument.cc
│       ├── Source_location_test.cc
│       ├── rt_test.cc
│       └── stdout_test.cc
├── coding-style.md
├── configure.py
├── cooking.sh
├── cooking_recipe.cmake
├── debug/
│   └── task-latency.stap
├── demos/
│   ├── CMakeLists.txt
│   ├── block_discard_demo.cc
│   ├── coroutines_demo.cc
│   ├── echo_demo.cc
│   ├── file_demo.cc
│   ├── hello-cxx-module.cc
│   ├── hello-world.cc
│   ├── http_client_demo.cc
│   ├── ip_demo.cc
│   ├── l3_demo.cc
│   ├── line_count_demo.cc
│   ├── rpc_demo.cc
│   ├── scheduling_group_demo.cc
│   ├── sharded_parameter_demo.cc
│   ├── tcp_demo.cc
│   ├── tcp_sctp_client_demo.cc
│   ├── tcp_sctp_server_demo.cc
│   ├── tls_echo_server.hh
│   ├── tls_echo_server_demo.cc
│   ├── tls_simple_client_demo.cc
│   ├── tutorial_examples.cc
│   ├── udp_client_demo.cc
│   ├── udp_server_demo.cc
│   ├── udp_zero_copy_demo.cc
│   ├── websocket_client_demo.cc
│   └── websocket_server_demo.cc
├── doc/
│   ├── CMakeLists.txt
│   ├── Doxyfile.in
│   ├── DoxygenLayout.xml
│   ├── compatibility.md
│   ├── contributing.md
│   ├── generator.md
│   ├── htmlsplit.py
│   ├── io-properties-file.md
│   ├── io-scheduler.md
│   ├── io-tester.md
│   ├── lambda-coroutine-fiasco.md
│   ├── md2html
│   ├── md2pdf
│   ├── mini-tutorial.md
│   ├── native-stack.md
│   ├── network-configuration.md
│   ├── network-connection-load-balancing.md
│   ├── prometheus.md
│   ├── rpc-compression.md
│   ├── rpc-streaming.md
│   ├── rpc.md
│   ├── shared-token-bucket.md
│   ├── signal.md
│   ├── template.css
│   ├── template.tex
│   ├── testing.md
│   ├── tutorial.md
│   └── websocket.md
├── docker/
│   └── dev/
│       └── Dockerfile
├── include/
│   └── seastar/
│       ├── core/
│       │   ├── abort_on_ebadf.hh
│       │   ├── abort_on_expiry.hh
│       │   ├── abort_source.hh
│       │   ├── abortable_fifo.hh
│       │   ├── alien.hh
│       │   ├── align.hh
│       │   ├── aligned_buffer.hh
│       │   ├── app-template.hh
│       │   ├── bitops.hh
│       │   ├── bitset-iter.hh
│       │   ├── byteorder.hh
│       │   ├── cacheline.hh
│       │   ├── checked_ptr.hh
│       │   ├── chunked_fifo.hh
│       │   ├── circular_buffer.hh
│       │   ├── circular_buffer_fixed_capacity.hh
│       │   ├── condition-variable.hh
│       │   ├── coroutine.hh
│       │   ├── deleter.hh
│       │   ├── disk_params.hh
│       │   ├── distributed.hh
│       │   ├── do_with.hh
│       │   ├── dpdk_rte.hh
│       │   ├── enum.hh
│       │   ├── exception_hacks.hh
│       │   ├── execution_stage.hh
│       │   ├── expiring_fifo.hh
│       │   ├── fair_queue.hh
│       │   ├── file-types.hh
│       │   ├── file.hh
│       │   ├── format.hh
│       │   ├── fsnotify.hh
│       │   ├── fsqual.hh
│       │   ├── fstream.hh
│       │   ├── function_traits.hh
│       │   ├── future-util.hh
│       │   ├── future.hh
│       │   ├── gate.hh
│       │   ├── idle_cpu_handler.hh
│       │   ├── internal/
│       │   │   ├── api-level.hh
│       │   │   ├── buffer_allocator.hh
│       │   │   ├── current_task.hh
│       │   │   ├── estimated_histogram.hh
│       │   │   ├── io_desc.hh
│       │   │   ├── io_intent.hh
│       │   │   ├── io_request.hh
│       │   │   ├── io_sink.hh
│       │   │   ├── linux-aio.hh
│       │   │   ├── poll.hh
│       │   │   ├── pollable_fd.hh
│       │   │   ├── run_in_background.hh
│       │   │   ├── stall_detector.hh
│       │   │   ├── systemwide_memory_barrier.hh
│       │   │   └── uname.hh
│       │   ├── io_intent.hh
│       │   ├── io_priority_class.hh
│       │   ├── io_queue.hh
│       │   ├── iostream-impl.hh
│       │   ├── iostream.hh
│       │   ├── layered_file.hh
│       │   ├── loop.hh
│       │   ├── lowres_clock.hh
│       │   ├── make_task.hh
│       │   ├── manual_clock.hh
│       │   ├── map_reduce.hh
│       │   ├── memory.hh
│       │   ├── metrics.hh
│       │   ├── metrics_api.hh
│       │   ├── metrics_registration.hh
│       │   ├── metrics_types.hh
│       │   ├── on_internal_error.hh
│       │   ├── pipe.hh
│       │   ├── polymorphic_temporary_buffer.hh
│       │   ├── posix.hh
│       │   ├── preempt.hh
│       │   ├── prefetch.hh
│       │   ├── print.hh
│       │   ├── prometheus.hh
│       │   ├── queue.hh
│       │   ├── ragel.hh
│       │   ├── reactor.hh
│       │   ├── reactor_config.hh
│       │   ├── relabel_config.hh
│       │   ├── report_exception.hh
│       │   ├── resource.hh
│       │   ├── rwlock.hh
│       │   ├── scattered_message.hh
│       │   ├── scheduling.hh
│       │   ├── scheduling_specific.hh
│       │   ├── scollectd.hh
│       │   ├── scollectd_api.hh
│       │   ├── seastar.hh
│       │   ├── semaphore.hh
│       │   ├── shard_id.hh
│       │   ├── sharded.hh
│       │   ├── shared_future.hh
│       │   ├── shared_mutex.hh
│       │   ├── shared_ptr.hh
│       │   ├── shared_ptr_debug_helper.hh
│       │   ├── shared_ptr_incomplete.hh
│       │   ├── signal.hh
│       │   ├── simple-stream.hh
│       │   ├── slab.hh
│       │   ├── sleep.hh
│       │   ├── smp.hh
│       │   ├── smp_options.hh
│       │   ├── sstring.hh
│       │   ├── stall_sampler.hh
│       │   ├── stream.hh
│       │   ├── task.hh
│       │   ├── temporary_buffer.hh
│       │   ├── thread.hh
│       │   ├── thread_cputime_clock.hh
│       │   ├── thread_impl.hh
│       │   ├── timed_out_error.hh
│       │   ├── timer-set.hh
│       │   ├── timer.hh
│       │   ├── transfer.hh
│       │   ├── unaligned.hh
│       │   ├── units.hh
│       │   ├── vector-data-sink.hh
│       │   ├── weak_ptr.hh
│       │   ├── when_all.hh
│       │   ├── when_any.hh
│       │   ├── with_scheduling_group.hh
│       │   └── with_timeout.hh
│       ├── coroutine/
│       │   ├── all.hh
│       │   ├── as_future.hh
│       │   ├── exception.hh
│       │   ├── generator.hh
│       │   ├── maybe_yield.hh
│       │   ├── parallel_for_each.hh
│       │   ├── switch_to.hh
│       │   └── try_future.hh
│       ├── http/
│       │   ├── api_docs.hh
│       │   ├── client.hh
│       │   ├── common.hh
│       │   ├── connection_factory.hh
│       │   ├── exception.hh
│       │   ├── file_handler.hh
│       │   ├── function_handlers.hh
│       │   ├── handlers.hh
│       │   ├── httpd.hh
│       │   ├── internal/
│       │   │   └── content_source.hh
│       │   ├── json_path.hh
│       │   ├── matcher.hh
│       │   ├── matchrules.hh
│       │   ├── mime_types.hh
│       │   ├── reply.hh
│       │   ├── request.hh
│       │   ├── retry_strategy.hh
│       │   ├── routes.hh
│       │   ├── short_streams.hh
│       │   ├── transformers.hh
│       │   ├── types.hh
│       │   └── url.hh
│       ├── json/
│       │   ├── formatter.hh
│       │   └── json_elements.hh
│       ├── net/
│       │   ├── api.hh
│       │   ├── arp.hh
│       │   ├── byteorder.hh
│       │   ├── config.hh
│       │   ├── const.hh
│       │   ├── dhcp.hh
│       │   ├── dns.hh
│       │   ├── dpdk.hh
│       │   ├── ethernet.hh
│       │   ├── inet_address.hh
│       │   ├── ip.hh
│       │   ├── ip_checksum.hh
│       │   ├── ipv4_address.hh
│       │   ├── ipv6_address.hh
│       │   ├── native-stack.hh
│       │   ├── net.hh
│       │   ├── packet-data-source.hh
│       │   ├── packet-util.hh
│       │   ├── packet.hh
│       │   ├── posix-stack.hh
│       │   ├── proxy.hh
│       │   ├── socket_defs.hh
│       │   ├── stack.hh
│       │   ├── tcp-stack.hh
│       │   ├── tcp.hh
│       │   ├── tls.hh
│       │   ├── toeplitz.hh
│       │   ├── udp.hh
│       │   ├── unix_address.hh
│       │   ├── virtio-interface.hh
│       │   └── virtio.hh
│       ├── rpc/
│       │   ├── lz4_compressor.hh
│       │   ├── lz4_fragmented_compressor.hh
│       │   ├── multi_algo_compressor_factory.hh
│       │   ├── rpc.hh
│       │   ├── rpc_impl.hh
│       │   └── rpc_types.hh
│       ├── testing/
│       │   ├── entry_point.hh
│       │   ├── exchanger.hh
│       │   ├── linux_perf_event.hh
│       │   ├── on_internal_error.hh
│       │   ├── perf_tests.hh
│       │   ├── random.hh
│       │   ├── seastar_test.hh
│       │   ├── test_case.hh
│       │   ├── test_fixture.hh
│       │   ├── test_runner.hh
│       │   └── thread_test_case.hh
│       ├── util/
│       │   ├── alloc_failure_injector.hh
│       │   ├── assert.hh
│       │   ├── backtrace.hh
│       │   ├── bool_class.hh
│       │   ├── closeable.hh
│       │   ├── conversions.hh
│       │   ├── critical_alloc_section.hh
│       │   ├── defer.hh
│       │   ├── eclipse.hh
│       │   ├── exceptions.hh
│       │   ├── file.hh
│       │   ├── function_input_iterator.hh
│       │   ├── indirect.hh
│       │   ├── integrated-length.hh
│       │   ├── internal/
│       │   │   ├── array_map.hh
│       │   │   ├── iovec_utils.hh
│       │   │   └── magic.hh
│       │   ├── iostream.hh
│       │   ├── is_smart_ptr.hh
│       │   ├── later.hh
│       │   ├── lazy.hh
│       │   ├── log-cli.hh
│       │   ├── log-impl.hh
│       │   ├── log-level.hh
│       │   ├── log.hh
│       │   ├── memory-data-sink.hh
│       │   ├── memory-data-source.hh
│       │   ├── memory_diagnostics.hh
│       │   ├── noncopyable_function.hh
│       │   ├── optimized_optional.hh
│       │   ├── print_safe.hh
│       │   ├── process.hh
│       │   ├── program-options.hh
│       │   ├── read_first_line.hh
│       │   ├── reference_wrapper.hh
│       │   ├── sampler.hh
│       │   ├── shared_token_bucket.hh
│       │   ├── short_streams.hh
│       │   ├── spinlock.hh
│       │   ├── std-compat.hh
│       │   ├── string_utils.hh
│       │   ├── tmp_file.hh
│       │   ├── transform_iterator.hh
│       │   ├── tuple_utils.hh
│       │   ├── used_size.hh
│       │   └── variant_utils.hh
│       └── websocket/
│           ├── client.hh
│           ├── common.hh
│           ├── parser.hh
│           └── server.hh
├── install-dependencies.sh
├── kvm/
│   ├── README.md
│   ├── register.sh
│   └── scripts/
│       └── bootstrap.sh
├── licenses/
│   ├── cmake.txt
│   ├── dpdk.txt
│   └── freebsd.txt
├── pkgconfig/
│   ├── seastar-testing.pc.in
│   └── seastar.pc.in
├── scripts/
│   ├── addr2line.py
│   ├── dpdk_nic_bind.py
│   ├── io-trace-parse.py
│   ├── perftune.py
│   ├── perftune.yaml
│   ├── posix_net_conf.sh
│   ├── pyproject.toml
│   ├── run_with_dpdk.sh
│   ├── seastar-addr2line
│   ├── seastar-cpu-map.sh
│   ├── seastar-json2code.py
│   ├── stall-analyser.py
│   └── tap.sh
├── seastar_cmake.py
├── src/
│   ├── core/
│   │   ├── alien.cc
│   │   ├── app-template.cc
│   │   ├── cgroup.hh
│   │   ├── condition-variable.cc
│   │   ├── disk_params.cc
│   │   ├── dpdk_rte.cc
│   │   ├── exception_hacks.cc
│   │   ├── execution_stage.cc
│   │   ├── fair_queue.cc
│   │   ├── file-impl.hh
│   │   ├── file.cc
│   │   ├── fsnotify.cc
│   │   ├── fsqual.cc
│   │   ├── fstream.cc
│   │   ├── future-util.cc
│   │   ├── future.cc
│   │   ├── io_queue.cc
│   │   ├── linux-aio.cc
│   │   ├── memory.cc
│   │   ├── metrics.cc
│   │   ├── on_internal_error.cc
│   │   ├── posix.cc
│   │   ├── prefault.hh
│   │   ├── program_options.cc
│   │   ├── program_options.hh
│   │   ├── prometheus-impl.hh
│   │   ├── prometheus.cc
│   │   ├── reactor.cc
│   │   ├── reactor_backend.cc
│   │   ├── reactor_backend.hh
│   │   ├── resource.cc
│   │   ├── scollectd-impl.hh
│   │   ├── scollectd.cc
│   │   ├── semaphore.cc
│   │   ├── sharded.cc
│   │   ├── signal.cc
│   │   ├── smp.cc
│   │   ├── sstring.cc
│   │   ├── syscall_result.hh
│   │   ├── syscall_work_queue.hh
│   │   ├── systemwide_memory_barrier.cc
│   │   ├── thread.cc
│   │   ├── thread_pool.cc
│   │   ├── thread_pool.hh
│   │   ├── uname.cc
│   │   └── vla.hh
│   ├── http/
│   │   ├── api_docs.cc
│   │   ├── chunk_parsers.rl
│   │   ├── client.cc
│   │   ├── common.cc
│   │   ├── file_handler.cc
│   │   ├── httpd.cc
│   │   ├── json_path.cc
│   │   ├── matcher.cc
│   │   ├── mime_types.cc
│   │   ├── reply.cc
│   │   ├── request.cc
│   │   ├── request_parser.rl
│   │   ├── response_parser.rl
│   │   ├── retry_strategy.cc
│   │   ├── routes.cc
│   │   ├── transformers.cc
│   │   └── url.cc
│   ├── json/
│   │   ├── formatter.cc
│   │   └── json_elements.cc
│   ├── net/
│   │   ├── arp.cc
│   │   ├── config.cc
│   │   ├── dhcp.cc
│   │   ├── dns.cc
│   │   ├── dpdk.cc
│   │   ├── ethernet.cc
│   │   ├── inet_address.cc
│   │   ├── ip.cc
│   │   ├── ip_checksum.cc
│   │   ├── native-stack-impl.hh
│   │   ├── native-stack.cc
│   │   ├── net.cc
│   │   ├── packet.cc
│   │   ├── posix-stack.cc
│   │   ├── proxy.cc
│   │   ├── socket_address.cc
│   │   ├── stack.cc
│   │   ├── tcp.cc
│   │   ├── tls.cc
│   │   ├── udp.cc
│   │   ├── unix_address.cc
│   │   └── virtio.cc
│   ├── proto/
│   │   └── metrics2.proto
│   ├── rpc/
│   │   ├── lz4_compressor.cc
│   │   ├── lz4_fragmented_compressor.cc
│   │   └── rpc.cc
│   ├── seastar.cppm
│   ├── testing/
│   │   ├── entry_point.cc
│   │   ├── random.cc
│   │   ├── seastar_test.cc
│   │   └── test_runner.cc
│   ├── util/
│   │   ├── alloc_failure_injector.cc
│   │   ├── backtrace.cc
│   │   ├── conversions.cc
│   │   ├── exceptions.cc
│   │   ├── file.cc
│   │   ├── log.cc
│   │   ├── process.cc
│   │   ├── program-options.cc
│   │   ├── read_first_line.cc
│   │   ├── short_streams.cc
│   │   └── tmp_file.cc
│   └── websocket/
│       ├── client.cc
│       ├── common.cc
│       ├── parser.cc
│       └── server.cc
├── test.py
└── tests/
    ├── CMakeLists.txt
    ├── fuzz/
    │   ├── CMakeLists.txt
    │   └── sstring_fuzz.cc
    ├── manual/
    │   ├── iosched.py
    │   ├── iosched_reproducers/
    │   │   ├── one_cpu_starved_shard_can_still_saturate_io.sh
    │   │   ├── one_cpu_starved_shard_has_reasonable_fairness.sh
    │   │   ├── scylla_tablet_migration.sh
    │   │   └── tau_nemesis.sh
    │   └── rl-iosched.py
    ├── perf/
    │   ├── CMakeLists.txt
    │   ├── allocator_perf.cc
    │   ├── container_perf.cc
    │   ├── coroutine_perf.cc
    │   ├── fair_queue_perf.cc
    │   ├── fstream_perf.cc
    │   ├── future_util_perf.cc
    │   ├── http_client_perf.cc
    │   ├── linux_perf_event.cc
    │   ├── metrics_perf.cc
    │   ├── perf-tests.md
    │   ├── perf_tests.cc
    │   ├── perf_tests_perf.cc
    │   ├── rpc_perf.cc
    │   ├── shared_token_bucket.cc
    │   ├── smp_submit_to_perf.cc
    │   └── thread_context_switch_test.cc
    └── unit/
        ├── CMakeLists.txt
        ├── abort_source_test.cc
        ├── abortable_fifo_test.cc
        ├── alien_test.cc
        ├── alloc_test.cc
        ├── allocator_test.cc
        ├── api.json
        ├── app-template_test.cc
        ├── cert.cfg.in
        ├── checked_ptr_test.cc
        ├── chunk_parsers_test.cc
        ├── chunked_fifo_test.cc
        ├── circular_buffer_fixed_capacity_test.cc
        ├── circular_buffer_test.cc
        ├── closeable_test.cc
        ├── condition_variable_test.cc
        ├── conf-example.yaml
        ├── connect_test.cc
        ├── content_source_test.cc
        ├── coroutines_test.cc
        ├── defer_test.cc
        ├── deleter_test.cc
        ├── directory_test.cc
        ├── distributed_test.cc
        ├── dns_test.cc
        ├── epoll_test.cc
        ├── exception_logging_test.cc
        ├── execution_stage_test.cc
        ├── expected_exception.hh
        ├── expiring_fifo_test.cc
        ├── fair_queue_test.cc
        ├── file_io_test.cc
        ├── file_utils_test.cc
        ├── foreign_ptr_test.cc
        ├── fsnotifier_test.cc
        ├── fstream_test.cc
        ├── futures_test.cc
        ├── gate_test.cc
        ├── generator_test.cc
        ├── httpd_test.cc
        ├── https-server.py
        ├── io_queue_test.cc
        ├── ipv6_test.cc
        ├── json2code_test.py
        ├── json_formatter_test.cc
        ├── libc_wrapper_test.cc
        ├── linux_perf_event_test.cc
        ├── locking_test.cc
        ├── log_buf_test.cc
        ├── loopback_socket.hh
        ├── lowres_clock_test.cc
        ├── memory-data-sink.hh
        ├── metrics_test.cc
        ├── metrics_tester.cc
        ├── mkcert.gmk
        ├── mkmtls.gmk
        ├── mock_file.hh
        ├── net_config_test.cc
        ├── network_interface_test.cc
        ├── noncopyable_function_test.cc
        ├── output_stream_test.cc
        ├── packet_test.cc
        ├── pipe_test.cc
        ├── program_options_test.cc
        ├── prometheus_http_test.cc
        ├── prometheus_test.py
        ├── prometheus_text_test.cc
        ├── proxy_protocol_test.cc
        ├── queue_test.cc
        ├── request_parser_test.cc
        ├── rest_api_httpd.cc
        ├── rpc_test.cc
        ├── scheduling_group_nesting_test.cc
        ├── scheduling_group_test.cc
        ├── semaphore_test.cc
        ├── sharded_test.cc
        ├── shared_ptr_test.cc
        ├── shared_token_bucket_test.cc
        ├── signal_test.cc
        ├── simple_stream_test.cc
        ├── slab_test.cc
        ├── smp_test.cc
        ├── socket_test.cc
        ├── source_location_test.cc
        ├── spawn_test.cc
        ├── sstring_test.cc
        ├── stall_detector_test.cc
        ├── stream_reader_test.cc
        ├── temporary_buffer_test.cc
        ├── test_fixture_test.cc
        ├── thread_test.cc
        ├── timer_test.cc
        ├── tl-generator.hh
        ├── tls-ca-bundle.pem
        ├── tls_test.cc
        ├── tmpdir.hh
        ├── tuple_utils_test.cc
        ├── uname_test.cc
        ├── unix_domain_test.cc
        ├── unwind_test.cc
        ├── variant_utils_test.cc
        ├── weak_ptr_test.cc
        └── websocket_test.cc

================================================
FILE CONTENTS
================================================

================================================
FILE: .clangd
================================================
Style:
  AngledHeaders:
    # public headers (under include/seastar) use angle brackets
    - "seastar/.*"


================================================
FILE: .claude/CLAUDE.md
================================================
# Seastar Project Instructions

## Building

The project uses CMake with ninja as the build system. Build directories are located in `build/<mode>`.

### Build Commands

**Build specific target:**
```bash
ninja -C build/<mode> <target>
```

Where `<mode>` is typically:
- `dev` - development build
- `debug` - debug build
- `release` - release build
- `sanitize` - sanitizer build (ASan/UBSan)

**List available targets:**
```bash
ninja -C build/<mode> -t targets
```

**List all targets (including test targets):**
```bash
ninja -C build/<mode> -t targets all
```

### Common Build Examples

```bash
# Build ioinfo tool in dev mode
ninja -C build/dev apps/io_tester/ioinfo

# Build io_tester in dev mode
ninja -C build/dev apps/io_tester/io_tester

# Build all in release mode
ninja -C build/release

# List all available targets
ninja -C build/dev -t targets all
```

### Important Notes

- **Check for existing build directories first** - if `build/<mode>` exists, use it directly; otherwise run `./configure.py --mode=<mode>` to create it
- **Always use `ninja -C build/<mode>`** from the repository root
- **Do NOT use** plain `ninja` from the root directory - it will fail with "Execute Ninja in a build directory"
- The working directory during builds should typically be the repository root
- After code changes to specific components, rebuild only that target for faster iteration

## Testing

The project uses CTest for running tests. Test executables are built in `build/<mode>/tests/unit/` and `build/<mode>/tests/perf/`.

### Test Runners

**`./test.py`** (preferred) - Python wrapper with useful options:
```bash
./test.py --mode dev --name <pattern>  # Run specific test in dev mode
./test.py --mode dev --fast            # Run only fast tests
./test.py --mode dev -v                # Verbose output
```

Options:
- `--mode <mode>` - Run for specific build mode (otherwise runs ALL modes)
- `--name <pattern>` - Filter tests by name
- `--fast` - Run only fast tests
- `--timeout <secs>` - Set timeout (default 300s)
- `--smp <n>` / `-c <n>` - Number of threads for multi-core tests (default 2)
- `--verbose` / `-v` - Verbose output
- `--offline` - Disable tests that access the internet

**`ninja -C build/<mode> test`** - Basic ctest invocation for a single mode. Less flexible, no `--output-on-failure` by default.

### Running Specific Tests

```bash
# Using test.py (preferred)
./test.py --mode dev --name circular_buffer

# Using ctest directly
ctest --test-dir build/dev -R circular_buffer --output-on-failure

# Run test executable directly
./build/dev/tests/unit/circular_buffer_test
```

**List all available tests:**
```bash
ctest --test-dir build/dev -N
```

### Test Types

- **Unit tests**: Located in `tests/unit/`, use Boost.Test framework
- **Performance tests**: Located in `tests/perf/`, benchmark various components

### Important Notes

- **When iterating on code changes**, choose an appropriate test that covers the modified code and run only that test
- **Running all tests is slow** - only run the full test suite when explicitly requested
- Most unit tests use Boost.Test and accept standard Boost.Test command line options
- Some tests (like allocator tests) may run for the default duration (5 seconds) unless interrupted

## Style

Minimum C++ version is C++20. Use C++20 API where possible.

Follow existing style.

Comment all public methods carefully following the style of the same source file (e.g., doxygen if existing comments use that style).


================================================
FILE: .dockerignore
================================================
.git
build


================================================
FILE: .gitattributes
================================================
*.cc diff=cpp
*.hh diff=cpp


================================================
FILE: .github/workflows/alpinelinux.yaml
================================================
name: Alpine Linux

on:
  pull_request:
  workflow_dispatch:  # Allows manual triggering

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    container:
      image: alpine:latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Install build dependencies
      run: |
        apk update
        apk add --no-cache   \
          boost-dev          \
          bsd-compat-headers \
          c-ares-dev         \
          cmake              \
          crypto++-dev       \
          gcc                \
          g++                \
          fmt-dev            \
          gnutls-dev         \
          hwloc-dev          \
          libpciaccess-dev   \
          libucontext-dev    \
          libunwind-dev      \
          liburing-dev       \
          lksctp-tools-dev   \
          lz4-dev            \
          numactl-dev        \
          openssl            \
          openssl-dev        \
          protobuf-dev       \
          py3-yaml           \
          ragel              \
          samurai            \
          util-linux-dev     \
          valgrind-dev       \
          xfsprogs-dev       \
          yaml-cpp-dev

    - name: Configure build
      run: |
        cmake -B build -G Ninja            \
         -DCMAKE_BUILD_TYPE=RelWithDebInfo \
         -DSeastar_DOCS=OFF

    - name: Build Seastar
      run: |
        cmake --build build

    - name: Run unit tests
      run: |
        ctest --test-dir build --output-on-failure -j2


================================================
FILE: .github/workflows/docker.yaml
================================================
name: Verify Dockerfile Build

on:
  pull_request:
    paths:
      - 'docker/dev/Dockerfile'
      - 'install-dependencies.sh'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
  build:
    timeout-minutes: 20
    runs-on: ubuntu-24.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          sparse-checkout: |
            docker/dev/Dockerfile
            install-dependencies.sh

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Build Docker image
        uses: docker/build-push-action@v6
        with:
          context: .
          file: docker/dev/Dockerfile
          push: false
          cache-from: type=gha
          cache-to: type=gha,mode=max


================================================
FILE: .github/workflows/pre-commit.yaml
================================================
name: Pre-commit

on: [push, pull_request]

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.x'
      - uses: pre-commit/action@v3.0.1
      - name: Show diff of fixes ($ at EOL)
        if: failure()
        # trailing whitespace is hard to see, so add $
        # to the end of diff lines
        run: git diff | sed '/^[+-]/s/$/$/'


================================================
FILE: .github/workflows/python-lint.yaml
================================================
name: Python format

on: [push, pull_request]

jobs:
  python-format:
    name: Enforce python format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: psf/black@24.8.0
        with:
            version: "24.8.0"
            src: ./scripts
            # override options so that we can specify only specific files for now
            options: "--check --diff --include=.*addr2line.*"


================================================
FILE: .github/workflows/test.yaml
================================================
name: Test

permissions:
  contents: read

on:
  workflow_call:
    inputs:
      compiler:
        description: 'the C++ compiler to use'
        type: string
        required: true
      standard:
        description: 'the C++ standard to use'
        type: number
        required: true
      mode:
        description: 'build mode (debug, dev or release)'
        type: string
        required: true
      enables:
        description: 'the --enable-* option passed to configure.py'
        type: string
        default: ''
        required: false
      enable-ccache:
        description: 'build with ccache enabled'
        type: boolean
        default: true
        required: false
      options:
        description: 'additional options passed to configure.py'
        type: string
        default: ''
        required: false
      test-args:
        description: 'additional arguments passed to test.py'
        type: string
        default: ''
        required: false

jobs:
  test:
    timeout-minutes: 40
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: "${{ contains(inputs.enables, 'dpdk') }}"

      - run: |
          sudo apt-get update

      - name: Install build dependencies
        run: |
          sudo ./install-dependencies.sh

      - name: Install clang++
        if: ${{ inputs.compiler == 'clang++' }}
        run: |
          sudo apt-get -y install clang-20

      - name: Install clang-scan-deps
        if: ${{ contains(inputs.enables, 'cxx-modules') }}
        run: |
          sudo apt-get -y install clang-tools-20

      - name: Install g++
        if: ${{ inputs.compiler == 'g++' }}
        run: |
          sudo apt-get -y install gcc-14 g++-14

      - name: Install ccache
        if: ${{ inputs.enable-ccache }}
        run: |
          sudo apt-get -y install ccache

      - name: Setup ccache
        if: ${{ inputs.enable-ccache }}
        uses: hendrikmuhs/ccache-action@v1
        with:
          key: ${{ inputs.compiler }}-${{ inputs.standard }}-${{ inputs.mode }}-${{ inputs.enables }}

      - name: Configure
        run: |
          if [ ${{ inputs.compiler }} = "clang++" ]; then
            CC=clang-20
            CPP=clang++-20
          else
            CC=gcc-14
            CPP=g++-14
          fi
          if ${{ inputs.enable-ccache }}; then
            MAYBE_CCACHE_OPT="--compiler-cache=ccache"
          fi
          ./configure.py                          \
            --c++-standard ${{ inputs.standard }} \
            --compiler $CPP                       \
            --c-compiler $CC                      \
            --mode ${{ inputs.mode }}             \
            $MAYBE_CCACHE_OPT                     \
            ${{ inputs.options }}                 \
            ${{ inputs.enables }}

      - name: Build
        run: cmake --build build/${{inputs.mode}}

      - name: Check Header
        if: ${{ inputs.mode == 'dev' && inputs.compiler == 'clang++' }}
        run: cmake --build build/${{ inputs.mode }} --target checkheaders

      - name: Check Include Style
        if: ${{ inputs.mode == 'dev' && inputs.compiler == 'clang++' }}
        run: cmake --build build/${{ inputs.mode }} --target check-include-style

      - name: Build with C++20 modules
        if: ${{ contains(inputs.enables, 'cxx-modules') }}
        run: cmake --build build/${{ inputs.mode }} --target hello_cxx_module

      - name: Test
        if: ${{ ! contains(inputs.enables, 'cxx-modules') }}
        run: ./test.py --mode=${{ inputs.mode }} ${{ inputs.test-args }}


================================================
FILE: .github/workflows/tests.yaml
================================================
name: Test

permissions:
  contents: read

on:
  push:
  pull_request:
  workflow_dispatch:  # Allows manual triggering

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
  regular_test:
    name: "Test (${{ matrix.compiler }}, C++${{ matrix.standard}}, ${{ matrix.mode }})"
    uses: ./.github/workflows/test.yaml
    strategy:
      fail-fast: false
      matrix:
        compiler: [clang++, g++]
        standard: [20, 23]
        mode: [dev, debug, release]
    with:
      compiler: ${{ matrix.compiler }}
      standard: ${{ matrix.standard }}
      mode: ${{ matrix.mode }}
      enables: ${{ matrix.enables }}
      options: ${{ matrix.options }}
  build_with_dpdk:
    name: "Test with DPDK enabled"
    uses: ./.github/workflows/test.yaml
    strategy:
      fail-fast: false
    with:
      compiler: clang++
      standard: 23
      mode: release
      enables: --enable-dpdk
      options: --cook dpdk --dpdk-machine corei7-avx

  build_with_cxx_modules:
    name: "Test with C++20 modules enabled"
    uses: ./.github/workflows/test.yaml
    strategy:
      fail-fast: false
    with:
      compiler: clang++
      standard: 23
      mode: debug
      enables: --enable-cxx-modules
      enable-ccache: false

  fuzz_test:
    name: "Fuzz Tests"
    uses: ./.github/workflows/test.yaml
    with:
      compiler: clang++
      standard: 23
      mode: fuzz
      test-args: "-- -R 'Seastar.fuzz.'"


================================================
FILE: .gitignore
================================================
.cooking_memory
.cproject
.project
.settings
build*
build.ninja
cscope.*
__pycache__/
cmake/Cooking.cmake
tags
.idea/
.vscode/
compile_commands.json
.cache


================================================
FILE: .gitmodules
================================================
[submodule "dpdk"]
	path = dpdk
	url = ../dpdk


================================================
FILE: .gitorderfile
================================================
*.py
*.hh
*.rl
*.cc
*


================================================
FILE: .mailmap
================================================
Avi Kivity <avi@scylladb.com> Avi Kivity' via seastar-dev <seastar-dev@googlegroups.com>
Raphael S. Carvalho <raphaelsc@scylladb.com> Raphael S. Carvalho' via seastar-dev <seastar-dev@googlegroups.com>
Pavel Emelyanov <xemul@scylladb.com> Pavel Emelyanov' via seastar-dev <seastar-dev@googlegroups.com>


================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace


================================================
FILE: CMakeLists.txt
================================================
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Copyright (C) 2018 Scylladb, Ltd.
#

cmake_minimum_required (VERSION 3.13)

list (APPEND CMAKE_MODULE_PATH
  ${CMAKE_CURRENT_SOURCE_DIR}/cmake
  ${CMAKE_CURRENT_BINARY_DIR})

cmake_policy (SET CMP0090 NEW)
foreach (policy CMP0127 CMP0135 CMP0167)
  if (POLICY ${policy})
    cmake_policy (SET ${policy} NEW)
  endif ()
endforeach ()

include (Cooking OPTIONAL)

# This variable impacts the way DPDK is configured by cmake-cooking (if DPDK is enabled), so its definition needs to
# come before PROJECT.
set (Seastar_DPDK_MACHINE
  "native"
  CACHE
  STRING
  "Configure DPDK for this processor architecture (if `Seastar_DPDK` is enabled). It configures -march or -mcpu")

project (Seastar
  VERSION 1.0
  LANGUAGES CXX)

set (Seastar_ALLOC_FAILURE_INJECTION
  "DEFAULT"
  CACHE
  STRING
  "Enable failure injection into the Seastar allocator. Can be ON, OFF or DEFAULT (which enables it for Dev mode)")

option (Seastar_TASK_BACKTRACE
  "Collect backtrace at deferring points."
  OFF)

option (Seastar_DEBUG_ALLOCATIONS
  "For now just writes 0xab to newly allocated memory"
  OFF)

option (Seastar_SSTRING
  "Use seastar's own string implementation"
  ON)

option (Seastar_DEPRECATED_OSTREAM_FORMATTERS
  "Enable operator<< for formatting standard library containers, which will be deprecated in future"
  ON)

set (Seastar_API_LEVEL
  "9"
  CACHE
  STRING
  "Seastar compatibility API level (7=unified CPU/IO scheduling groups, 8=noncopyable function in json_return_type, 9=new sink API")

set_property (CACHE Seastar_API_LEVEL
  PROPERTY
  STRINGS 7)

set (Seastar_SCHEDULING_GROUPS_COUNT
  "16"
  CACHE
  STRING
  "A positive number to set Seastar's reactor number of allowed different scheduling groups.")

if (NOT Seastar_SCHEDULING_GROUPS_COUNT MATCHES "^[1-9][0-9]*")
  message(FATAL_ERROR "Seastar_SCHEDULING_GROUPS_COUNT must be a positive number (${Seastar_SCHEDULING_GROUPS_COUNT})")
endif ()

#
# Add a dev build type.
#
# All pre-defined build modes include optimizations or debug info,
# which make them slow to build. The dev build mode is intended for
# fast build/test iteration.
#

if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
  set (CMAKE_CXX_FLAGS_DEV_OPT_LEVEL "-O2")
else ()
  set (CMAKE_CXX_FLAGS_DEV_OPT_LEVEL "-O1")
endif ()

set (CMAKE_CXX_FLAGS_DEV
  "${CMAKE_CXX_FLAGS_DEV_OPT_LEVEL}"
  CACHE
  STRING
  "Flags used by the C++ compiler during dev builds."
  FORCE)

set (CMAKE_C_FLAGS_DEV
  "-O1"
  CACHE
  STRING
  "Flags used by the C compiler during dev builds."
  FORCE)

set (CMAKE_EXE_LINKER_FLAGS_DEV
  ""
  CACHE
  STRING
  "Flags used for linking binaries during dev builds."
  FORCE)

set (CMAKE_SHARED_LINKER_FLAGS_DEV
  ""
  CACHE
  STRING
  "Flags used by the shared libraries linker during builds."
  FORCE)

mark_as_advanced (
    CMAKE_CXX_FLAGS_DEV
    CMAKE_C_FLAGS_DEV
    CMAKE_EXE_LINKER_FLAGS_DEV
    CMAKE_SHARED_LINKER_FLAGS_DEV)

set (CMAKE_CXX_FLAGS_SANITIZE
  "-Os -g"
  CACHE
  STRING
  "Flags used by the C++ compiler during sanitize builds."
  FORCE)

set (CMAKE_CXX_STANDARD
  "23"
  CACHE
  STRING
  "C++ standard to build with.")

include (CMakeDependentOption)
cmake_dependent_option (Seastar_MODULE
  "Build a C++20 module instead of a traditional library" OFF
  "CMAKE_VERSION VERSION_GREATER_EQUAL 3.26;CMAKE_CXX_STANDARD GREATER_EQUAL 20" OFF)

set (CMAKE_C_FLAGS_SANITIZE
  "-Os -g"
  CACHE
  STRING
  "Flags used by the C compiler during sanitize builds."
  FORCE)

set (CMAKE_EXE_LINKER_FLAGS_SANITIZE
  ""
  CACHE
  STRING
  "Flags used for linking binaries during sanitize builds."
  FORCE)

set (CMAKE_SHARED_LINKER_FLAGS_SANITIZE
  ""
  CACHE
  STRING
  "Flags used by the shared libraries linker during sanitize builds."
  FORCE)

mark_as_advanced (
    CMAKE_CXX_FLAGS_SANITIZE
    CMAKE_C_FLAGS_SANITIZE
    CMAKE_EXE_LINKER_FLAGS_SANITIZE
    CMAKE_SHARED_LINKER_FLAGS_SANITIZE)

set (CMAKE_CXX_FLAGS_FUZZ
  "-O1 -g"
  CACHE
  STRING
  "Flags used by the C++ compiler during fuzz builds."
  FORCE)

set (CMAKE_C_FLAGS_FUZZ
  "-O1 -g"
  CACHE
  STRING
  "Flags used by the C compiler during fuzz builds."
  FORCE)

set (CMAKE_EXE_LINKER_FLAGS_FUZZ
  ""
  CACHE
  STRING
  "Flags used for linking binaries during fuzz builds."
  FORCE)

set (CMAKE_SHARED_LINKER_FLAGS_FUZZ
  ""
  CACHE
  STRING
  "Flags used by the shared libraries linker during fuzz builds."
  FORCE)

mark_as_advanced (
    CMAKE_CXX_FLAGS_FUZZ
    CMAKE_C_FLAGS_FUZZ
    CMAKE_EXE_LINKER_FLAGS_FUZZ
    CMAKE_SHARED_LINKER_FLAGS_FUZZ)

set (CMAKE_BUILD_TYPE
  "${CMAKE_BUILD_TYPE}"
  CACHE
  STRING
  "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Dev Sanitize Fuzz."
  FORCE)

if (NOT CMAKE_BUILD_TYPE)
  set (CMAKE_BUILD_TYPE "Release")
endif ()

set (Seastar_ALLOC_PAGE_SIZE
  ""
  CACHE
  STRING
  "Override the Seastar allocator page size, in bytes.")

function (set_option_if_package_is_found option_name package_name)
  # if the package is found, set the option on behalf of user unless it is
  # explicitly specified,
  if (DEFINED ${option_name})
    return ()
  endif ()
  if (${package_name}_FOUND)
    set (${option_name} ON CACHE BOOL "")
  endif ()
endfunction ()

# When Seastar is a top-level project, enable the non-library targets by default.
# If it is embedded with `add_subdirectory`, disable them.
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
  set (Seastar_MASTER_PROJECT ON)
else ()
  set (Seastar_MASTER_PROJECT OFF)
endif ()

option (Seastar_APPS
  "Enable application targets."
  ${Seastar_MASTER_PROJECT})

set (Seastar_CXX_FLAGS
  ""
  CACHE
  STRING
  "Semicolon-separated list of extra compilation flags for Seastar itself.")

set (Seastar_SOURCE_SUBDIR
  ""
  CACHE
  STRING
  "When non-empty, add -ffile-prefix-map rules so that gdb can resolve Seastar sources. Set to the path of the Seastar source tree relative to the consumer project root (e.g. 'seastar/'). The rules map CMAKE_CURRENT_BINARY_DIR to '.' and paths under it to this subdir, and are appended after Seastar_CXX_FLAGS so they take precedence over any broader -ffile-prefix-map rule.")

option (Seastar_DEMOS
  "Enable demonstration targets."
  ${Seastar_MASTER_PROJECT})

option (Seastar_DOCS
  "Enable documentation targets."
  ${Seastar_MASTER_PROJECT})

option (Seastar_DPDK
  "Enable DPDK support."
  OFF)

option (Seastar_EXCLUDE_APPS_FROM_ALL
  "When enabled alongside Seastar_APPS, do not build applications by default."
  OFF)

option (Seastar_EXCLUDE_DEMOS_FROM_ALL
  "When enabled alongside Seastar_DEMOS, do not build demonstrations by default."
  OFF)

option (Seastar_EXCLUDE_TESTS_FROM_ALL
  "When enabled alongside Seastar_TESTING, do not build tests by default."
  OFF)

option (Seastar_EXECUTE_ONLY_FAST_TESTS
  "Only execute tests which run quickly."
  OFF)

option (Seastar_HWLOC
  "Enable hwloc support."
  ON)

option (Seastar_IO_URING
  "Enable io_uring support."
  ON)

set (Seastar_JENKINS
  ""
  CACHE
  STRING
  "If non-empty, the prefix for XML files containing the results of running tests (for Jenkins).")

set (Seastar_LD_FLAGS
  ""
  CACHE
  STRING
  "Semicolon-separated list of extra linking flags for Seastar itself.")

option (Seastar_INSTALL
  "Install targets."
  ${Seastar_MASTER_PROJECT})

option (Seastar_TESTING
  "Enable testing targets."
  ${Seastar_MASTER_PROJECT})

include (CMakeDependentOption)
cmake_dependent_option (Seastar_ENABLE_TESTS_ACCESSING_INTERNET
  "Enable tests accessing internet." ON
  "Seastar_TESTING" OFF)

option (Seastar_COMPRESS_DEBUG
  "Compress debug info."
  ON)

option (Seastar_SPLIT_DWARF
  "Use split dwarf."
  OFF)

option (Seastar_HEAP_PROFILING
    "Enable heap profiling. No effect when Seastar is compiled with the default allocator."
    OFF)

option (Seastar_DEFERRED_ACTION_REQUIRE_NOEXCEPT
    "Enable noexcept requirement for deferred actions."
    ON)

set (Seastar_TEST_TIMEOUT
  "300"
  CACHE
  STRING
  "Maximum allowed time for a test to run, in seconds.")

option (BUILD_SHARED_LIBS
  "Build seastar library as shared libraries instead of static"
  OFF)
# We set the following environment variables
# * ASAN_OPTIONS=disable_coredump=0:abort_on_error=1:detect_stack_use_after_return=1:verify_asan_link_order=0
#   By default ASan disables core dumps because they used to be
#   huge. This is no longer the case since the shadow memory is
#   excluded, so it is safe to enable them.
# * UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1
#   Fail the test if any undefined behavior is found and use abort
#   instead of exit. Using abort is what causes core dumps to be
#   produced.
# * BOOST_TEST_CATCH_SYSTEM_ERRORS=no
#   Normally the boost test library handles SIGABRT and prevents core
#   dumps from being produced.
# This works great with clang and gcc 10.2, but unfortunately not any
# previous gcc.
set (Seastar_ASAN_OPTIONS "disable_coredump=0:abort_on_error=1")
if ((NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) OR
    (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2))
  string (APPEND Seastar_ASAN_OPTIONS ":detect_stack_use_after_return=1")
endif ()

set (Seastar_TEST_ENVIRONMENT
  "ASAN_OPTIONS=${Seastar_ASAN_OPTIONS};UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1;BOOST_TEST_CATCH_SYSTEM_ERRORS=no"
  CACHE
  STRING
  "Environment variables for running tests")

option (Seastar_UNUSED_RESULT_ERROR
  "Make [[nodiscard]] violations an error (instead of a warning)."
  OFF)

set (Seastar_STACK_GUARDS
  "DEFAULT"
  CACHE
  STRING
  "Enable stack guards. Can be ON, OFF or DEFAULT (which enables it for non release builds)")

set (Seastar_SANITIZE
  "DEFAULT"
  CACHE
  STRING
  "Enable ASAN and UBSAN. Can be ON, OFF or DEFAULT (which enables it for Debug and Sanitize)")

set (Seastar_DEBUG_SHARED_PTR
  "DEFAULT"
  CACHE
  STRING
  "Enable shared_ptr debugging. Can be ON, OFF or DEFAULT (which enables it for Debug and Sanitize)")

#
# Useful (non-cache) variables.
#

set (Seastar_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set (Seastar_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set (Seastar_GEN_BINARY_DIR ${Seastar_BINARY_DIR}/gen)

#
# Dependencies.
#

include (SeastarDependencies)
seastar_find_dependencies ()

# Private build dependencies not visible to consumers
find_package (ragel 6.10 REQUIRED)
find_package (Threads REQUIRED)
find_package (PthreadSetName REQUIRED)
find_package (Valgrind REQUIRED)

cmake_dependent_option (Seastar_LOGGER_COMPILE_TIME_FMT
  "Enable the compile-time {fmt} check when formatting logging messages" ON
  "fmt_VERSION VERSION_GREATER_EQUAL 9.0.0" OFF)

#
# Code generation helpers.
#

function (seastar_generate_protobuf)
  set (one_value_args TARGET VAR IN_FILE OUT_DIR)
  cmake_parse_arguments (args "" "${one_value_args}" "" ${ARGN})
  get_filename_component (in_file_name ${args_IN_FILE} NAME_WE)
  get_filename_component (in_file_dir ${args_IN_FILE} DIRECTORY)
  set (header_out ${args_OUT_DIR}/${in_file_name}.pb.h)
  set (source_out ${args_OUT_DIR}/${in_file_name}.pb.cc)

  add_custom_command (
    DEPENDS ${args_IN_FILE} protobuf::protoc
    OUTPUT ${header_out} ${source_out}
    COMMAND ${CMAKE_COMMAND} -E make_directory ${args_OUT_DIR}
    COMMAND protobuf::protoc
    ARGS --cpp_out=${args_OUT_DIR} -I${in_file_dir} ${args_IN_FILE})

  add_custom_target (${args_TARGET}
    DEPENDS
      ${header_out}
      ${source_out})

  set (${args_VAR} ${header_out} ${source_out} PARENT_SCOPE)
endfunction ()

function (seastar_generate_ragel)
  set (one_value_args TARGET VAR IN_FILE OUT_FILE)
  cmake_parse_arguments (args "" "${one_value_args}" "" ${ARGN})
  get_filename_component (out_dir ${args_OUT_FILE} DIRECTORY)

  add_custom_command (
    DEPENDS ${args_IN_FILE}
    OUTPUT ${args_OUT_FILE}
    COMMAND ${CMAKE_COMMAND} -E make_directory ${out_dir}
    COMMAND ${ragel_RAGEL_EXECUTABLE} -G2 -o ${args_OUT_FILE} ${args_IN_FILE}
    COMMAND sed -i -e "'1h;2,$$H;$$!d;g'" -re "'s/static const char _nfa[^;]*;//g'" ${args_OUT_FILE}
    COMMAND touch ${args_OUT_FILE} -r ${args_IN_FILE})

  add_custom_target (${args_TARGET}
    DEPENDS ${args_OUT_FILE})

  set (${args_VAR} ${args_OUT_FILE} PARENT_SCOPE)
endfunction ()

function (seastar_generate_swagger)
  set (one_value_args TARGET VAR IN_FILE OUT_DIR)
  cmake_parse_arguments (args "" "${one_value_args}" "" ${ARGN})
  get_filename_component (in_file_name ${args_IN_FILE} NAME)
  set (generator ${Seastar_SOURCE_DIR}/scripts/seastar-json2code.py)
  set (header_out ${args_OUT_DIR}/${in_file_name}.hh)
  set (source_out ${args_OUT_DIR}/${in_file_name}.cc)

  add_custom_command (
    DEPENDS
      ${args_IN_FILE}
      ${generator}
    OUTPUT ${header_out} ${source_out}
    COMMAND ${CMAKE_COMMAND} -E make_directory ${args_OUT_DIR}
    COMMAND ${generator} --create-cc -f ${args_IN_FILE} -o ${header_out})

  add_custom_target (${args_TARGET}
    DEPENDS
      ${header_out}
      ${source_out})

  set (${args_VAR} ${header_out} ${source_out} PARENT_SCOPE)
endfunction ()

#
# The `seastar` library.
#

seastar_generate_ragel (
  TARGET seastar_http_chunk_parsers
  VAR http_chunk_parsers_file
  IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/http/chunk_parsers.rl
  OUT_FILE ${Seastar_GEN_BINARY_DIR}/include/seastar/http/chunk_parsers.hh)

seastar_generate_ragel (
  TARGET seastar_http_request_parser
  VAR http_request_parser_file
  IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/http/request_parser.rl
  OUT_FILE ${Seastar_GEN_BINARY_DIR}/include/seastar/http/request_parser.hh)

seastar_generate_ragel (
  TARGET seastar_http_response_parser
  VAR http_response_parser_file
  IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/http/response_parser.rl
  OUT_FILE ${Seastar_GEN_BINARY_DIR}/include/seastar/http/response_parser.hh)

seastar_generate_protobuf (
  TARGET seastar_proto_metrics2
  VAR proto_metrics2_files
  IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/proto/metrics2.proto
  OUT_DIR ${Seastar_GEN_BINARY_DIR}/src/proto)

add_library (seastar
  ${http_chunk_parsers_file}
  ${http_request_parser_file}
  ${proto_metrics2_files}
  ${seastar_dpdk_obj}
  include/seastar/core/abort_source.hh
  include/seastar/core/alien.hh
  include/seastar/core/align.hh
  include/seastar/core/aligned_buffer.hh
  include/seastar/core/app-template.hh
  include/seastar/core/bitops.hh
  include/seastar/core/bitset-iter.hh
  include/seastar/core/byteorder.hh
  include/seastar/core/cacheline.hh
  include/seastar/core/checked_ptr.hh
  include/seastar/core/chunked_fifo.hh
  include/seastar/core/circular_buffer.hh
  include/seastar/core/circular_buffer_fixed_capacity.hh
  include/seastar/core/condition-variable.hh
  include/seastar/core/deleter.hh
  include/seastar/core/disk_params.hh
  include/seastar/core/distributed.hh
  include/seastar/core/do_with.hh
  include/seastar/core/dpdk_rte.hh
  include/seastar/core/enum.hh
  include/seastar/core/exception_hacks.hh
  include/seastar/core/execution_stage.hh
  include/seastar/core/expiring_fifo.hh
  include/seastar/core/fair_queue.hh
  include/seastar/core/file.hh
  include/seastar/core/file-types.hh
  include/seastar/core/fsqual.hh
  include/seastar/core/fstream.hh
  include/seastar/core/function_traits.hh
  include/seastar/core/future-util.hh
  include/seastar/core/future.hh
  include/seastar/core/gate.hh
  include/seastar/core/iostream-impl.hh
  include/seastar/core/iostream.hh
  include/seastar/util/later.hh
  include/seastar/core/layered_file.hh
  include/seastar/core/loop.hh
  include/seastar/core/lowres_clock.hh
  include/seastar/core/manual_clock.hh
  include/seastar/core/map_reduce.hh
  include/seastar/core/memory.hh
  include/seastar/core/metrics.hh
  include/seastar/core/metrics_api.hh
  include/seastar/core/metrics_registration.hh
  include/seastar/core/metrics_types.hh
  include/seastar/core/pipe.hh
  include/seastar/core/posix.hh
  include/seastar/core/preempt.hh
  include/seastar/core/prefetch.hh
  include/seastar/core/print.hh
  include/seastar/core/prometheus.hh
  include/seastar/core/queue.hh
  include/seastar/core/ragel.hh
  include/seastar/core/reactor.hh
  include/seastar/core/report_exception.hh
  include/seastar/core/resource.hh
  include/seastar/core/rwlock.hh
  include/seastar/core/scattered_message.hh
  include/seastar/core/scheduling.hh
  include/seastar/core/scollectd.hh
  include/seastar/core/scollectd_api.hh
  include/seastar/core/seastar.hh
  include/seastar/core/smp.hh
  include/seastar/core/semaphore.hh
  include/seastar/core/shard_id.hh
  include/seastar/core/sharded.hh
  include/seastar/core/shared_future.hh
  include/seastar/core/shared_mutex.hh
  include/seastar/core/shared_ptr.hh
  include/seastar/core/shared_ptr_debug_helper.hh
  include/seastar/core/shared_ptr_incomplete.hh
  include/seastar/core/simple-stream.hh
  include/seastar/core/signal.hh
  include/seastar/core/slab.hh
  include/seastar/core/sleep.hh
  include/seastar/core/sstring.hh
  include/seastar/core/stall_sampler.hh
  include/seastar/core/stream.hh
  include/seastar/core/task.hh
  include/seastar/core/temporary_buffer.hh
  include/seastar/core/thread.hh
  include/seastar/core/thread_cputime_clock.hh
  include/seastar/core/thread_impl.hh
  include/seastar/core/timed_out_error.hh
  include/seastar/core/timer-set.hh
  include/seastar/core/timer.hh
  include/seastar/core/transfer.hh
  include/seastar/core/unaligned.hh
  include/seastar/core/units.hh
  include/seastar/core/vector-data-sink.hh
  include/seastar/core/weak_ptr.hh
  include/seastar/core/when_all.hh
  include/seastar/core/with_scheduling_group.hh
  include/seastar/core/with_timeout.hh
  include/seastar/http/api_docs.hh
  include/seastar/http/common.hh
  include/seastar/http/exception.hh
  include/seastar/http/file_handler.hh
  include/seastar/http/function_handlers.hh
  include/seastar/http/handlers.hh
  include/seastar/http/httpd.hh
  include/seastar/http/json_path.hh
  include/seastar/http/matcher.hh
  include/seastar/http/matchrules.hh
  include/seastar/http/mime_types.hh
  include/seastar/http/reply.hh
  include/seastar/http/request.hh
  include/seastar/http/routes.hh
  include/seastar/http/short_streams.hh
  include/seastar/http/transformers.hh
  include/seastar/http/client.hh
  include/seastar/json/formatter.hh
  include/seastar/json/json_elements.hh
  include/seastar/net/api.hh
  include/seastar/net/arp.hh
  include/seastar/net/byteorder.hh
  include/seastar/net/config.hh
  include/seastar/net/const.hh
  include/seastar/net/dhcp.hh
  include/seastar/net/dns.hh
  include/seastar/net/dpdk.hh
  include/seastar/net/ethernet.hh
  include/seastar/net/inet_address.hh
  include/seastar/net/ip.hh
  include/seastar/net/ip_checksum.hh
  include/seastar/net/native-stack.hh
  include/seastar/net/net.hh
  include/seastar/net/packet-data-source.hh
  include/seastar/net/packet-util.hh
  include/seastar/net/packet.hh
  include/seastar/net/posix-stack.hh
  include/seastar/net/proxy.hh
  include/seastar/net/socket_defs.hh
  include/seastar/net/stack.hh
  include/seastar/net/tcp-stack.hh
  include/seastar/net/tcp.hh
  include/seastar/net/tls.hh
  include/seastar/net/toeplitz.hh
  include/seastar/net/udp.hh
  include/seastar/net/unix_address.hh
  include/seastar/net/virtio-interface.hh
  include/seastar/net/virtio.hh
  include/seastar/rpc/lz4_compressor.hh
  include/seastar/rpc/lz4_fragmented_compressor.hh
  include/seastar/rpc/multi_algo_compressor_factory.hh
  include/seastar/rpc/rpc.hh
  include/seastar/rpc/rpc_impl.hh
  include/seastar/rpc/rpc_types.hh
  include/seastar/util/alloc_failure_injector.hh
  include/seastar/util/backtrace.hh
  include/seastar/util/bool_class.hh
  include/seastar/util/conversions.hh
  include/seastar/util/defer.hh
  include/seastar/util/eclipse.hh
  include/seastar/util/function_input_iterator.hh
  include/seastar/util/indirect.hh
  include/seastar/util/is_smart_ptr.hh
  include/seastar/util/lazy.hh
  include/seastar/util/log-cli.hh
  include/seastar/util/log-impl.hh
  include/seastar/util/log.hh
  include/seastar/util/noncopyable_function.hh
  include/seastar/util/optimized_optional.hh
  include/seastar/util/print_safe.hh
  include/seastar/util/process.hh
  include/seastar/util/program-options.hh
  include/seastar/util/read_first_line.hh
  include/seastar/util/reference_wrapper.hh
  include/seastar/util/spinlock.hh
  include/seastar/util/std-compat.hh
  include/seastar/util/transform_iterator.hh
  include/seastar/util/tuple_utils.hh
  include/seastar/util/variant_utils.hh
  include/seastar/util/closeable.hh
  include/seastar/util/short_streams.hh
  include/seastar/websocket/client.hh
  include/seastar/websocket/common.hh
  include/seastar/websocket/server.hh
  src/core/alien.cc
  src/core/file.cc
  src/core/fair_queue.cc
  src/core/reactor_backend.cc
  src/core/thread_pool.cc
  src/core/app-template.cc
  src/core/disk_params.cc
  src/core/dpdk_rte.cc
  src/core/exception_hacks.cc
  src/core/execution_stage.cc
  src/core/file-impl.hh
  src/core/fsnotify.cc
  src/core/fsqual.cc
  src/core/fstream.cc
  src/core/future.cc
  src/core/future-util.cc
  src/core/linux-aio.cc
  src/core/memory.cc
  src/core/metrics.cc
  src/core/on_internal_error.cc
  src/core/posix.cc
  src/core/prometheus.cc
  src/core/program_options.cc
  src/core/reactor.cc
  src/core/resource.cc
  src/core/sharded.cc
  src/core/scollectd.cc
  src/core/scollectd-impl.hh
  src/core/signal.cc
  src/core/systemwide_memory_barrier.cc
  src/core/smp.cc
  src/core/sstring.cc
  src/core/thread.cc
  src/core/uname.cc
  src/core/vla.hh
  src/core/io_queue.cc
  src/core/semaphore.cc
  src/core/condition-variable.cc
  src/http/api_docs.cc
  src/http/common.cc
  src/http/file_handler.cc
  src/http/httpd.cc
  src/http/json_path.cc
  src/http/matcher.cc
  src/http/mime_types.cc
  src/http/reply.cc
  src/http/routes.cc
  src/http/transformers.cc
  src/http/url.cc
  src/http/client.cc
  src/http/request.cc
  src/http/retry_strategy.cc
  src/json/formatter.cc
  src/json/json_elements.cc
  src/net/arp.cc
  src/net/config.cc
  src/net/dhcp.cc
  src/net/dns.cc
  src/net/dpdk.cc
  src/net/ethernet.cc
  src/net/inet_address.cc
  src/net/ip.cc
  src/net/ip_checksum.cc
  src/net/native-stack-impl.hh
  src/net/native-stack.cc
  src/net/net.cc
  src/net/packet.cc
  src/net/posix-stack.cc
  src/net/proxy.cc
  src/net/socket_address.cc
  src/net/stack.cc
  src/net/tcp.cc
  src/net/tls.cc
  src/net/udp.cc
  src/net/unix_address.cc
  src/net/virtio.cc
  src/rpc/lz4_compressor.cc
  src/rpc/lz4_fragmented_compressor.cc
  src/rpc/rpc.cc
  src/util/alloc_failure_injector.cc
  src/util/backtrace.cc
  src/util/conversions.cc
  src/util/exceptions.cc
  src/util/file.cc
  src/util/log.cc
  src/util/process.cc
  src/util/program-options.cc
  src/util/read_first_line.cc
  src/util/tmp_file.cc
  src/util/short_streams.cc
  src/websocket/parser.cc
  src/websocket/common.cc
  src/websocket/client.cc
  src/websocket/server.cc
  )

if (Seastar_MODULE)
  target_sources(seastar
    PUBLIC
      FILE_SET CXX_MODULES
      TYPE CXX_MODULES
      FILES
        src/seastar.cppm
  )
endif ()

add_library (Seastar::seastar ALIAS seastar)

add_dependencies (seastar
  seastar_http_chunk_parsers
  seastar_http_request_parser
  seastar_http_response_parser
  seastar_proto_metrics2)

target_include_directories (seastar
  PUBLIC
    $<INSTALL_INTERFACE:include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<BUILD_INTERFACE:${Seastar_GEN_BINARY_DIR}/include>
    $<BUILD_INTERFACE:${Seastar_GEN_BINARY_DIR}/src>
  PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/src)

set (Seastar_PRIVATE_CXX_FLAGS
  -fno-semantic-interposition
  -Wall
  -Werror
  -Wimplicit-fallthrough
  -Wdeprecated
  -Wno-error=deprecated)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
  include (CheckGcc107852)
  if (NOT Cxx_Compiler_BZ107852_Free)
    list (APPEND Seastar_PRIVATE_CXX_FLAGS
      -Wno-error=stringop-overflow
      -Wno-error=array-bounds)
  endif ()
  list (APPEND Seastar_PRIVATE_CXX_FLAGS
    -Wdeprecated-declarations
    -Wno-error=deprecated-declarations)
endif ()

if (CMAKE_CXX_STANDARD GREATER_EQUAL 23)
  include (CheckP2582R1)
  if (Cxx_Compiler_IMPLEMENTS_P2581R1)
    target_compile_definitions (seastar
      PUBLIC SEASTAR_P2581R1)
  endif ()
endif ()

if (BUILD_SHARED_LIBS)
  # use initial-exec TLS, as it puts the TLS variables in the static TLS space
  # instead of allocating them using malloc. otherwise intercepting mallocs and
  # friends could lead to recursive call of malloc functions when a dlopen'ed
  # shared object references a TLS variable and it in turn uses malloc. the
  # downside of this workaround is that the static TLS space is used, and it is
  # a global resource.
  list (APPEND Seastar_PRIVATE_CXX_FLAGS
    $<$<IN_LIST:$<CONFIG>,RelWithDebInfo;Dev>:-ftls-model=initial-exec>)
else ()
  list (APPEND Seastar_PRIVATE_CXX_FLAGS -fvisibility=hidden)
endif ()

if (Seastar_COMPRESS_DEBUG)
  # -gz doesn't imply -g, so it is safe to add it regardless of debug
  # info being enabled.
  list (APPEND Seastar_PRIVATE_CXX_FLAGS -gz)
endif ()

target_link_libraries (seastar
  PUBLIC
    Boost::boost
    Boost::program_options
    c-ares::cares
    fmt::fmt
    lz4::lz4
  PRIVATE
    ${CMAKE_DL_LIBS}
    GnuTLS::gnutls
    StdAtomic::atomic
    lksctp-tools::lksctp-tools
    protobuf::libprotobuf
    rt::rt
    ucontext::ucontext
    yaml-cpp::yaml-cpp
    Threads::Threads)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.26)
  target_link_libraries (seastar
    PRIVATE
      "$<BUILD_LOCAL_INTERFACE:Valgrind::valgrind>")
else ()
  target_link_libraries (seastar
    PRIVATE
      "$<BUILD_INTERFACE:Valgrind::valgrind>")
endif ()

if (Seastar_DPDK)
  target_link_libraries (seastar
    PRIVATE
      DPDK::dpdk)
endif ()

include (TriStateOption)
tri_state_option (${Seastar_SANITIZE}
  DEFAULT_BUILD_TYPES "Debug" "Sanitize" "Fuzz"
  CONDITION condition)
if (condition)
  if (NOT Sanitizers_FOUND)
    message (FATAL_ERROR "Sanitizers not found!")
  endif ()
  set (Seastar_Sanitizers_OPTIONS ${Sanitizers_COMPILE_OPTIONS})
  target_link_libraries (seastar
    PUBLIC
      $<${condition}:Sanitizers::address>
      $<${condition}:Sanitizers::undefined_behavior>
      $<${condition}:Sanitizers::vptr>)
endif ()

# Link with fuzzer instrumentation for Fuzz builds
if (CMAKE_BUILD_TYPE STREQUAL "Fuzz")
  find_package (Sanitizers REQUIRED COMPONENTS fuzzer)
  target_link_libraries (seastar
    PUBLIC Sanitizers::fuzzer)
endif ()

# We only need valgrind to find uninitialized memory uses, so disable
# the leak sanitizer.
# To test with valgrind run "ctest -T memcheck"
set( MEMORYCHECK_COMMAND_OPTIONS "--error-exitcode=1 --leak-check=no --trace-children=yes" )
include (CTest)

#
# To disable -Werror, pass -Wno-error to Seastar_CXX_FLAGS.
#

target_compile_definitions(seastar
  PUBLIC
  SEASTAR_API_LEVEL=${Seastar_API_LEVEL}
  $<$<BOOL:${BUILD_SHARED_LIBS}>:SEASTAR_BUILD_SHARED_LIBS>)

target_compile_features(seastar
  PUBLIC
    cxx_std_${CMAKE_CXX_STANDARD})

include (CheckCXXCompilerFlag)
check_cxx_compiler_flag ("-Wno-maybe-uninitialized -Werror" MaybeUninitialized_FOUND)
if (MaybeUninitialized_FOUND)
  target_compile_options (seastar
    PUBLIC
      # With std::experimental::optional it is easy to hit
      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88897.  We disable
      # -Wmaybe-uninitialized in here since otherwise we would have to
      # disable it on many types used inside optional<>.
      -Wno-maybe-uninitialized)
endif ()

if (Seastar_SSTRING)
  target_compile_definitions (seastar
    PUBLIC SEASTAR_SSTRING)
endif ()

if (Seastar_DEPRECATED_OSTREAM_FORMATTERS)
  target_compile_definitions (seastar
    PUBLIC SEASTAR_DEPRECATED_OSTREAM_FORMATTERS)
endif ()

if (LinuxMembarrier_FOUND)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAS_MEMBARRIER)

  target_link_libraries (seastar
    PRIVATE LinuxMembarrier::membarrier)
endif ()

tri_state_option (${Seastar_ALLOC_FAILURE_INJECTION}
  DEFAULT_BUILD_TYPES "Dev"
  CONDITION condition)
if (condition)
  target_compile_definitions (seastar
    PUBLIC $<${condition}:SEASTAR_ENABLE_ALLOC_FAILURE_INJECTION>)
endif ()

if (Seastar_TASK_BACKTRACE)
  target_compile_definitions (seastar
    PUBLIC SEASTAR_TASK_BACKTRACE)
endif ()

if (Seastar_DEBUG_ALLOCATIONS)
  target_compile_definitions (seastar
    PRIVATE SEASTAR_DEBUG_ALLOCATIONS)
endif ()

if (Sanitizers_FIBER_SUPPORT)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_ASAN_FIBER_SUPPORT)
endif ()

if (Seastar_ALLOC_PAGE_SIZE)
  target_compile_definitions (seastar
    PUBLIC SEASTAR_OVERRIDE_ALLOCATOR_PAGE_SIZE=${Seastar_ALLOC_PAGE_SIZE})
endif ()

if (Seastar_LOGGER_COMPILE_TIME_FMT)
  target_compile_definitions (seastar
    PUBLIC SEASTAR_LOGGER_COMPILE_TIME_FMT)
endif ()

target_compile_definitions (seastar
  PUBLIC SEASTAR_SCHEDULING_GROUPS_COUNT=${Seastar_SCHEDULING_GROUPS_COUNT})

if (Seastar_CXX_FLAGS)
  list (APPEND Seastar_PRIVATE_CXX_FLAGS ${Seastar_CXX_FLAGS})
endif ()

# When the consumer specifies Seastar_SOURCE_SUBDIR, add -ffile-prefix-map
# rules so that gdb can resolve Seastar sources correctly.
#
# Without these rules, a broader -ffile-prefix-map=<project_root>=. (typically
# passed via Seastar_CXX_FLAGS) maps CMAKE_CURRENT_BINARY_DIR to a relative
# build path (e.g. ./build/dev/seastar).  GDB then concatenates that with the
# source-relative DW_AT_name and looks for a non-existent path like
# ./build/dev/seastar/./seastar/src/core/reactor_backend.cc.
#
# Rule 1 maps the build dir itself to ".", fixing DW_AT_comp_dir.
# Rule 2 maps paths *under* the build dir (generated sources) to the subdir.
# Both rules must appear AFTER Seastar_CXX_FLAGS because both GCC and clang
# apply the last matching -ffile-prefix-map rule.
if (Seastar_SOURCE_SUBDIR)
  list (APPEND Seastar_PRIVATE_CXX_FLAGS
    -ffile-prefix-map=${CMAKE_CURRENT_BINARY_DIR}=.
    -ffile-prefix-map=${CMAKE_CURRENT_BINARY_DIR}/=${Seastar_SOURCE_SUBDIR})
endif ()

# When using split dwarf --gdb-index is effectively required since
# otherwise gdb is just too slow. We also want to use split dwarf in
# as many compilation units as possible.  So while these flags don't
# have to be public, we don't expect anyone to want to build seastar
# with them and some client code without.
if (Seastar_SPLIT_DWARF)
  set (Seastar_SPLIT_DWARF_FLAG "-Wl,--gdb-index")
  target_link_libraries (seastar PUBLIC
    $<$<NOT:$<CONFIG:Dev>>:${Seastar_SPLIT_DWARF_FLAG}>)
  target_compile_options (seastar PUBLIC
    $<$<NOT:$<CONFIG:Dev>>:-gsplit-dwarf>)
endif ()

if (Seastar_HEAP_PROFILING)
    set_property (
      SOURCE "src/core/memory.cc"
      PROPERTY
      COMPILE_DEFINITIONS SEASTAR_HEAPPROF)
    set_property (
      SOURCE "src/core/reactor.cc"
      PROPERTY
      COMPILE_DEFINITIONS SEASTAR_HEAPPROF)
endif ()

if (Seastar_DEFERRED_ACTION_REQUIRE_NOEXCEPT)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_DEFERRED_ACTION_REQUIRE_NOEXCEPT)
endif ()

if (Seastar_DPDK)
  if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
    target_compile_options (seastar
      PUBLIC
        -mcpu=${Seastar_DPDK_MACHINE}
        -mtune=${Seastar_DPDK_MACHINE})
  else()
    target_compile_options (seastar
      PUBLIC
        -march=${Seastar_DPDK_MACHINE})
  endif ()
  target_compile_definitions (seastar
    PUBLIC SEASTAR_HAVE_DPDK)
endif ()

if (Seastar_HWLOC)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_HWLOC)

  target_link_libraries (seastar
    PRIVATE hwloc::hwloc)
endif ()

set_option_if_package_is_found (Seastar_IO_URING LibUring)
if (Seastar_IO_URING)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_URING)
  target_link_libraries (seastar
    PRIVATE URING::uring)
endif ()

if (Seastar_LD_FLAGS)
  target_link_options (seastar
    PRIVATE ${Seastar_LD_FLAGS})
endif ()

if (SystemTap-SDT_FOUND)
  list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_SYSTEMTAP_SDT)

  target_link_libraries (seastar
    PRIVATE SystemTap::SDT)
endif ()

check_cxx_compiler_flag ("-Werror=unused-result" ErrorUnused_FOUND)
if (ErrorUnused_FOUND)
  if (Seastar_UNUSED_RESULT_ERROR)
    target_compile_options (seastar
      PUBLIC -Werror=unused-result)
  else()
    target_compile_options (seastar
      PUBLIC -Wno-error=unused-result)
  endif ()
endif ()

check_cxx_compiler_flag ("-Wno-error=#warnings" ErrorWarnings_FOUND)
if (ErrorWarnings_FOUND)
  target_compile_options (seastar
      PRIVATE "-Wno-error=#warnings")
endif ()

foreach (definition
    SEASTAR_DEBUG
    SEASTAR_DEFAULT_ALLOCATOR
    SEASTAR_SHUFFLE_TASK_QUEUE)
  target_compile_definitions (seastar
    PUBLIC
      $<$<IN_LIST:$<CONFIG>,Debug;Sanitize;Fuzz>:${definition}>)
endforeach ()

tri_state_option (${Seastar_DEBUG_SHARED_PTR}
  DEFAULT_BUILD_TYPES "Debug" "Sanitize" "Fuzz"
  CONDITION condition)
if (condition)
  target_compile_definitions (seastar
    PUBLIC
      $<${condition}:SEASTAR_DEBUG_SHARED_PTR>)
endif ()

tri_state_option (${Seastar_DEBUG_SHARED_PTR}
  DEFAULT_BUILD_TYPES "Debug" "Sanitize" "Fuzz"
  CONDITION condition)
if (condition)
  target_compile_definitions (seastar
    PUBLIC
      $<${condition}:SEASTAR_DEBUG_PROMISE>)
endif ()

include (CheckLibc)

tri_state_option (${Seastar_STACK_GUARDS}
  DEFAULT_BUILD_TYPES "Debug" "Sanitize" "Dev" "Fuzz"
  CONDITION condition)
if (condition)
  # check for -fstack-clash-protection together with -Werror, because
  # otherwise clang can soft-fail (return 0 but emit a warning) instead.
  check_cxx_compiler_flag ("-fstack-clash-protection -Werror" StackClashProtection_FOUND)
  if (StackClashProtection_FOUND)
    target_compile_options (seastar
      PUBLIC
        $<${condition}:-fstack-clash-protection>)
  endif ()
  target_compile_definitions (seastar
    PRIVATE
      $<${condition}:SEASTAR_THREAD_STACK_GUARDS>)
endif ()

target_compile_definitions (seastar
  PUBLIC
    $<$<IN_LIST:$<CONFIG>,Dev;Debug>:SEASTAR_TYPE_ERASE_MORE>)

target_compile_definitions (seastar
  PRIVATE ${Seastar_PRIVATE_COMPILE_DEFINITIONS})

target_compile_options (seastar
  PRIVATE ${Seastar_PRIVATE_CXX_FLAGS})

set_target_properties (seastar
  PROPERTIES
    CXX_STANDARD ${CMAKE_CXX_STANDARD}
    CXX_EXTENSIONS ON)

add_library (seastar_private INTERFACE)

target_compile_definitions (seastar_private
  INTERFACE ${Seastar_PRIVATE_COMPILE_DEFINITIONS})

target_compile_options (seastar_private
  INTERFACE ${Seastar_PRIVATE_CXX_FLAGS})

target_link_libraries (seastar_private
  INTERFACE seastar)

#
# The testing library.
#

if (Seastar_INSTALL OR Seastar_TESTING)
  add_library (seastar_testing
    include/seastar/testing/entry_point.hh
    include/seastar/testing/exchanger.hh
    include/seastar/testing/random.hh
    include/seastar/testing/seastar_test.hh
    include/seastar/testing/test_case.hh
    include/seastar/testing/test_runner.hh
    include/seastar/testing/thread_test_case.hh
    src/testing/entry_point.cc
    src/testing/random.cc
    src/testing/seastar_test.cc
    src/testing/test_runner.cc)

  add_library (Seastar::seastar_testing ALIAS seastar_testing)

  target_compile_definitions (seastar_testing
    PRIVATE ${Seastar_PRIVATE_COMPILE_DEFINITIONS})

  target_compile_options (seastar_testing
    PRIVATE ${Seastar_PRIVATE_CXX_FLAGS})

  target_link_libraries (seastar_testing
    PUBLIC
      Boost::unit_test_framework
      Boost::dynamic_linking
      seastar)

  add_library(seastar_perf_testing
    src/testing/random.cc
    include/seastar/testing/perf_tests.hh
    tests/perf/perf_tests.cc
    tests/perf/linux_perf_event.cc)
  add_library (Seastar::seastar_perf_testing ALIAS seastar_perf_testing)
  target_compile_definitions (seastar_perf_testing
    PRIVATE ${Seastar_PRIVATE_COMPILE_DEFINITIONS})
  target_compile_options (seastar_perf_testing
    PRIVATE ${Seastar_PRIVATE_CXX_FLAGS})
  target_link_libraries (seastar_perf_testing
    PUBLIC
    seastar)

endif ()

if (Seastar_MODULE)
  if (POLICY CMP0155)
    cmake_policy (SET CMP0155 NEW)
  endif ()
  include (CxxModulesRules)
endif ()

#
# The tests themselves.
#

if (Seastar_TESTING)
  enable_testing ()

  if (Seastar_EXCLUDE_TESTS_FROM_ALL)
    set (exclude EXCLUDE_FROM_ALL)
  else ()
    set (exclude "")
  endif ()

  add_subdirectory (tests ${exclude})
endif ()

#
# Demonstrations.
#

if (Seastar_DEMOS)
  if (Seastar_EXCLUDE_DEMOS_FROM_ALL)
    set (exclude EXCLUDE_FROM_ALL)
  else ()
    set (exclude "")
  endif ()

  add_subdirectory (demos ${exclude})
endif ()

#
# Documentation.
#

if (Seastar_DOCS)
  add_subdirectory (doc)
endif ()

#
# Applications.
#

if (Seastar_APPS)
  if (Seastar_EXCLUDE_APPS_FROM_ALL)
    set (exclude EXCLUDE_FROM_ALL)
  else ()
    set (exclude "")
  endif ()

  add_subdirectory (apps ${exclude})
endif ()

if (CMAKE_BUILD_TYPE STREQUAL "Dev")
  include (CheckHeaders)
  include (CheckIncludeStyle)
  add_custom_target (checkheaders)
  add_custom_target (check-include-style)
  foreach (lib seastar seastar_testing seastar_perf_testing)
    if (TARGET ${lib})
      seastar_check_self_contained (checkheaders ${lib}
        INCLUDE "\\.hh$"
        # impl.hh headers are internal implementations of .hh, so they are not
        # compilable. let's exclude them from the files to be checked.
        EXCLUDE "_impl.hh$|-impl.hh$")
      seastar_check_include_style (check-include-style ${lib})
    endif ()
  endforeach ()
endif ()

#
# Installation and export.
#

if (Seastar_INSTALL)
  #
  # pkg-config generation.
  #
  # Note that unlike the CMake "config module", this description is not relocatable because
  # some dependencies do not natively support pkg-config.
  #

  # Necessary here for pkg-config.
  include (GNUInstallDirs)

  # Set paths in pkg-config files for installation.
  set (Seastar_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
  set (Seastar_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
  set (Seastar_PKG_CONFIG_SEASTAR_INCLUDE_FLAGS "-I${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")

  get_property (_is_Multi_Config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
  if (_is_Multi_Config)
    # use different library names for each config
    set (Seastar_PC "_$<CONFIG>.pc")
  else ()
    set (Seastar_PC ".pc")
  endif ()

  if(CMAKE_CXX_EXTENSIONS)
    set(Seastar_CXX_COMPILE_OPTION ${CMAKE_CXX${CMAKE_CXX_STANDARD}_EXTENSION_COMPILE_OPTION})
  else()
    set(Seastar_CXX_COMPILE_OPTION ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION})
  endif()

  configure_file (
    ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/seastar.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-install${Seastar_PC}.in
    @ONLY)

  configure_file (
    ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/seastar-testing.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-testing-install.pc.in
    @ONLY)

  # Set paths in pkg-config files for direct use in the build directory.
  set (Seastar_PKG_CONFIG_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
  set (Seastar_PKG_CONFIG_LIBDIR ${CMAKE_CURRENT_BINARY_DIR})
  set (Seastar_PKG_CONFIG_SEASTAR_INCLUDE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/include -I${CMAKE_CURRENT_BINARY_DIR}/gen/include")

  configure_file (
    ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/seastar.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar${Seastar_PC}.in
    @ONLY)

  configure_file (
    ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/seastar-testing.pc.in
    ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-testing.pc.in
    @ONLY)

  file (GENERATE
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/seastar${Seastar_PC}
    INPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar${Seastar_PC}.in)

  file (GENERATE
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/seastar-testing.pc
    INPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-testing.pc.in)

  file (GENERATE
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/seastar-install${Seastar_PC}
    INPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-install${Seastar_PC}.in)

  file (GENERATE
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/seastar-testing-install.pc
    INPUT ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/seastar-testing-install.pc.in)

  include (CMakePackageConfigHelpers)
  set (install_cmakedir ${CMAKE_INSTALL_LIBDIR}/cmake/Seastar)

  install (
    DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

  install (
    DIRECTORY ${Seastar_GEN_BINARY_DIR}/include/
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

  install (
    PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/seastar-json2code.py
    DESTINATION ${CMAKE_INSTALL_BINDIR})

  set (seastar_install_targets
    TARGETS
      seastar
      seastar_testing
      seastar_perf_testing
    EXPORT seastar-export
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

  if (Seastar_MODULE)
    list (APPEND seastar_install_targets
      FILE_SET CXX_MODULES
        DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cxx/modules"
      CXX_MODULES_BMI
        DESTINATION "${CMAKE_INSTALL_LIBDIR}/cxx/bmi")
  endif ()

  install (${seastar_install_targets})

  install (
    EXPORT seastar-export
    FILE SeastarTargets.cmake
    NAMESPACE Seastar::
    DESTINATION ${install_cmakedir})

  write_basic_package_version_file (
    ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfigVersion.cmake
    VERSION ${PROJECT_VERSION}
    COMPATIBILITY ExactVersion)

  configure_package_config_file (
    ${CMAKE_CURRENT_LIST_DIR}/cmake/SeastarConfig.cmake.in
    ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfig.cmake
    INSTALL_DESTINATION ${install_cmakedir})

  install (
    FILES
      ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfig.cmake
      ${CMAKE_CURRENT_BINARY_DIR}/SeastarConfigVersion.cmake
    DESTINATION ${install_cmakedir})

  install (
    FILES
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindGnuTLS.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLinuxMembarrier.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSanitizers.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindStdAtomic.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findc-ares.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Finddpdk.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findhwloc.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlksctp-tools.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlz4.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findragel.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findrt.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Finducontext.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findyaml-cpp.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/SeastarDependencies.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLibUring.cmake
      ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindSystemTap-SDT.cmake
    DESTINATION ${install_cmakedir})

  install (
    DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/code_tests
    DESTINATION ${install_cmakedir})

  install (
    FILES ${CMAKE_CURRENT_BINARY_DIR}/seastar-install${Seastar_PC}
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
    RENAME seastar${Seastar_PC})

  install (
    FILES ${CMAKE_CURRENT_BINARY_DIR}/seastar-testing-install.pc
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
    RENAME seastar-testing.pc)

  if (Seastar_MODULE)
    install (
      TARGETS seastar
      CXX_MODULES_BMI
        DESTINATION "${CMAKE_INSTALL_LIBDIR}/cxx/bmi"
      FILE_SET CXX_MODULES
        DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cxx/modules")
  endif ()

  #
  # Export targets from the build tree for the user package registry.
  #

  set (export_args
    EXPORT seastar-export
    FILE ${CMAKE_CURRENT_BINARY_DIR}/SeastarTargets.cmake
    NAMESPACE Seastar::)

  if (Seastar_MODULE)
    list (APPEND export_args CXX_MODULES_DIRECTORY "include/cxx/modules")
  endif ()

  export (${export_args})

  export (PACKAGE Seastar)

  #
  # Packaging.
  #

  set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
  set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
  set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})

  include (CPack)
endif ()


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing Code to Seastar

There are two ways to contribute code to Seastar:
* send your changes as [patches](https://github.com/scylladb/scylla/wiki/Formatting-and-sending-patches) to the [mailing list](https://groups.google.com/forum/#!forum/seastar-dev).
* alternatively, open a [github pull request](https://github.com/scylladb/seastar/pulls).

# Asking questions or requesting help

Use the [Seastar mailing list](https://groups.google.com/forum/#!forum/seastar-dev) for general questions and help.

# Reporting an issue

Please use the [Issue Tracker](https://github.com/scylladb/seastar/issues/) to report issues. Supply as much information about your environment as possible, especially for performance problems.



================================================
FILE: HACKING.md
================================================
# Developing and using Seastar

## Configuring the project

There are multiple ways to configure Seastar and its dependencies.

### Use system-packages for most dependencies

See the instructions in [README.md](./README.md).

### Download and install all external dependencies in a project-specific location

- First pull the git submodules using `git submodule update --init --recursive`

- Use `cmake-cooking` to prepare a development environment with all dependencies.  This allows for reproducible development environments, but means that approximately 3 GiB of dependencies get installed to `build/_cooking_`:

```
./cooking.sh
```

- The same as above, and enable DPDK support:

```
./cooking.sh -- -DSeastar_DPDK=ON
```

- Use system packages for all dependencies except `dpdk`, which is provided by `cmake-cooking` (and not yet widely available via system package-managers):

```
./cooking.sh -i dpdk
```

- Use `cmake-cooking` for all dependencies except for Boost:

```
./cooking.sh -e Boost
```

- The same, but compile in "release" mode:

```
./cooking.sh -e Boost -t Release
```

## Using an IDE with CMake support

If you use `configure.py` or `cooking.sh` to to configure Seastar, then the easiest way to use an IDE (such as Qt Creator, or CLion) for development is to instruct the IDE, when it invokes CMake, to include the following option:

```
-DCMAKE_PREFIX_PATH=${source_dir}/build/_cooking/installed
```

where `${source_dir}` is the root of the Seastar source tree on your file-system.

This will allow the IDE to also index Seastar's dependencies.

## Building the project

```
cd $my_build_dir
ninja
```

If you used `configure.py` to configure Seastar, then the build directory will be `build/$mode`. For example, `build/release`.

If you use `cooking.sh`, then the build directory will just be `build`.

## Running tests

Make sure you are in the "build" directory.

- Run unit tests:

```
ninja test_unit
```

- Run all tests:

```
ninja test
```

- Build and run a specific test:

```
ninja test_unit_thread_run
```


## Building documentation

Make sure you are in the "build" directory.

- Build all documentation:

```
ninja docs
```

- Build the tutorial in HTML form:

```
ninja doc_tutorial_html
```

- Build the tutorial in HTML form (one file per chapter):

```
ninja doc_tutorial_html_split
```

- Build the Doxygen documentation:

```
ninja doc_api
```

## Installing the project

Choose the install path:

With `configure.py`:

```
./configure.py --mode=release --prefix=/my/install/path
```

With `cooking.sh`:

```
./cooking.sh -- -DCMAKE_INSTALL_PREFIX=/my/install/path
```

```
ninja -C build install
```

## Using Seastar in an application

### CMake

Once Seastar has been installed, it is sufficient to add a dependency on Seastar with

```
find_package (Seastar ${VERSION} REQUIRED)

add_executable (my_program
  my_program.cc)

target_link_libraries (my_program
  PRIVATE Seastar::seastar)
```

where `VERSION` is the desired version.

If you'd like to use `cmake-cooking` to set up a development environment which includes Seastar and its dependencies (a "recipe"), you can include Seastar as follows:

```
cooking_ingredient (Seastar
  COOKING_RECIPE <DEFAULT>
  COOKING_CMAKE_ARGS
    -DSeastar_APPS=OFF
    -DSeastar_DEMOS=OFF
    -DSeastar_DOCS=OFF
    -DSeastar_TESTING=OFF
  EXTERNAL_PROJECT_ARGS
    SOURCE_DIR ${MY_SEASTAR_SOURCE_DIR})
```

### pkg-config

Seastar includes a `seastar.pc` file. It can be used from both the
install and build directories.

Compiling a single file:
```
g++ foo.cc -o foo $(pkg-config --libs --cflags --static /path/to/seastar.pc)
```

Compiling multiple files:
```
# Compiling sources into object files
g++ -c $(pkg-config --cflags /path/to/seastar.pc) foo.cc -o foo.o
g++ -c $(pkg-config --cflags /path/to/seastar.pc) bar.cc -o bar.o

# Linking object files into an executable
g++ -o foo_bar foo.o bar.o $(pkg-config --libs --static /path/to/seastar.pc)
```

The `--static` flag is needed to include transitive (private) dependencies of `libseastar.a`.

## Development Tools

### Pre-commit hooks

This project uses [pre-commit](https://pre-commit.com/) to enforce some basic checks. These
checks run in CI, but you can also run them locally as a pre-commit hook as follows.

#### Installation

[Install pre-commit](https://pre-commit.com/#install), following those instructions or
perhaps using `uv` to avoid polluting your global environment:

```
uv tool install pre-commit
```

#### Setup

Install the git hooks:

```
pre-commit install
```

This will run the configured hooks automatically on every commit.

#### Manual execution

Run hooks on all files:

```
pre-commit run --all-files
```

Run hooks on staged files only:

```
pre-commit run
```


================================================
FILE: LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS


================================================
FILE: NOTICE
================================================
Seastar Framework
Copyright 2015 Cloudius Systems

This works contains software from the OSv project (http://osv.io), licensed
under the BSD license.

This work contains software from the DPDK project (http://dpdk.org), licensed
under the BSD license.  The software is under the dpdk/ directory.

This work contains software from the Android Open Source Project,
licensed under the Apache2 license.
The software is in the include/seastar/util/sampler.hh file.


================================================
FILE: README-DPDK.md
================================================
Seastar and DPDK
================

Seastar uses the Data Plane Development Kit to drive NIC hardware directly.  This
provides an enormous performance boost.

To enable DPDK, specify `--enable-dpdk` to `./configure.py`, and `--dpdk-pmd` as a
run-time parameter.  This will use the DPDK package provided as a git submodule with the
seastar sources.

Please note, if `--enable-dpdk` is used to build DPDK on an aarch64 machine, you need to
specify [target architecture](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html) with optional
[feature modifiers](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#aarch64-feature-modifiers)
with the `--cflags` option as well, like:
```console
$ ./configure.py --mode debug --enable-dpdk --cflags='-march=armv8-a+crc+crypto'
```

To use your own self-compiled DPDK package, follow this procedure:

1. Setup host to compile DPDK:
   - Ubuntu
     `sudo apt-get install -y build-essential linux-image-extra-$(uname -r)`
2. Prepare a DPDK SDK:
   - Download the latest DPDK release: `wget https://fast.dpdk.org/rel/dpdk-23.07.tar.xz`
   - Untar it.
   - Follow the [Quick Start Guide](https://core.dpdk.org/doc/quick-start/)
   - Pass `-Dmbuf_refcnt_atomic=false` to meson.
3. Modify the CMake cache (`CMakeCache.txt`) to inform CMake of the location of the installed DPDK SDK.


================================================
FILE: README.md
================================================
Seastar
=======

[![Test](https://github.com/scylladb/seastar/actions/workflows/tests.yaml/badge.svg)](https://github.com/scylladb/seastar/actions/workflows/tests.yaml)
[![Version](https://img.shields.io/github/tag/scylladb/seastar.svg?label=version&colorB=green)](https://github.com/scylladb/seastar/releases)
[![License: Apache2](https://img.shields.io/github/license/scylladb/seastar.svg)](https://github.com/scylladb/seastar/blob/master/LICENSE)
[![n00b issues](https://img.shields.io/github/issues/scylladb/seastar/n00b.svg?colorB=green)](https://github.com/scylladb/seastar/labels/n00b)

Introduction
------------

SeaStar is an event-driven framework allowing you to write non-blocking,
asynchronous code in a relatively straightforward manner (once understood).
It is based on [futures](http://en.wikipedia.org/wiki/Futures_and_promises).

Building Seastar
--------------------

For more details and alternative work-flows, read [HACKING.md](./HACKING.md).

Assuming that you would like to use system packages (RPMs or DEBs) for Seastar's dependencies, first install them:

```
$ sudo ./install-dependencies.sh
```

then configure (in "release" mode):

```
$ ./configure.py --mode=release
```
then compile:

```
$ ninja -C build/release
```

In case there are compilation issues, especially like ```g++: internal compiler error: Killed (program cc1plus)```
try giving more memory to gcc, either by limiting the amount of threads ( -j1 ) and/or allowing at least 4g ram to your
machine.

If you're missing a dependency of Seastar, then it is possible to have the configuration process fetch a version of the dependency locally for development.

For example, to fetch `fmt` locally, configure Seastar like this:

```
$ ./configure.py --mode=dev --cook fmt
```

`--cook` can be repeated many times for selecting multiple dependencies.


Build modes
----------------------------------------------------------------------------

The configure.py script is a wrapper around cmake. The --mode argument
maps to CMAKE_BUILD_TYPE, and supports the following modes

|          | CMake mode          | Debug info | Optimi&shy;zations | Sanitizers   | Allocator | Checks   | Use for                                |
| -------- | ------------------- | ---------- | ------------------ |------------- | --------- | -------- | -------------------------------------- |
| debug    | `Debug`             | Yes        | `-O0`              | ASAN, UBSAN  | System    | All      | gdb                                    |
| release  | `RelWithDebInfo`    | Yes        | `-O3`              | None         | Seastar   | Asserts  | production                             |
| dev      | `Dev` (Custom)      | No         | `-O1`              | None         | Seastar   | Asserts  | build and test cycle                   |
| sanitize | `Sanitize` (Custom) | Yes        | `-Os`              | ASAN, UBSAN  | System    | All      | second level of tests, track down bugs |

Note that seastar is more sensitive to allocators and optimizations than
usual. A quick rule of the thumb of the relative performances is that
release is 2 times faster than dev, 150 times faster than sanitize and
300 times faster than debug.

Using Seastar from its build directory (without installation)
----------------------------------------------------------------------------

It's possible to consume Seastar directly from its build directory with CMake or `pkg-config`.

We'll assume that the Seastar repository is located in a directory at `$seastar_dir`.


Via `pkg-config`:

```
$ g++ my_app.cc $(pkg-config --libs --cflags --static $seastar_dir/build/release/seastar.pc) -o my_app
```

and with CMake using the `Seastar` package:


`CMakeLists.txt` for `my_app`:

```
set (CMAKE_CXX_STANDARD 23)

find_package (Seastar REQUIRED)

add_executable (my_app
  my_app.cc)

target_link_libraries (my_app
  Seastar::seastar)
```

```
$ mkdir $my_app_dir/build
$ cd $my_app_dir/build
$ cmake -DCMAKE_PREFIX_PATH="$seastar_dir/build/release;$seastar_dir/build/release/_cooking/installed" -DCMAKE_MODULE_PATH=$seastar_dir/cmake $my_app_dir
```

The `CMAKE_PREFIX_PATH` values ensure that CMake can locate Seastar and its compiled submodules. The `CMAKE_MODULE_PATH` value ensures that CMake can uses Seastar's CMake scripts for locating its dependencies.

Using an installed Seastar
--------------------------------

You can also consume Seastar after it has been installed to the file-system.

**Important:**

- Seastar works with a customized version of DPDK, so by default builds and installs the DPDK submodule to `$build_dir/_cooking/installed`

First, configure the installation path:

```
$ ./configure.py --mode=release --prefix=/usr/local
```

then run the `install` target:

```
$ ninja -C build/release install
```

then consume it from `pkg-config`:

```
$ g++ my_app.cc $(pkg-config --libs --cflags --static seastar) -o my_app
```

or consume it with the same `CMakeLists.txt` as before but with a simpler CMake invocation:

```
$ cmake ..
```

(If Seastar has not been installed to a "standard" location like `/usr` or `/usr/local`, then you can invoke CMake with `-DCMAKE_PREFIX_PATH=$my_install_root`.)

There are also instructions for building on any host that supports [Docker](doc/building-docker.md).

Use of the [DPDK](http://dpdk.org) is [optional](doc/building-dpdk.md).

#### Seastar's C++ standard: C++20 or C++23

Seastar supports both C++20, and C++23. The build defaults to the latest
standard supported by your compiler, but can be explicitly selected with
the `--c++-standard` configure option, e.g., `--c++-standard=20`,
or if using CMake directly, by setting on the `CMAKE_CXX_STANDARD` CMake
variable.

See the [compatibity statement](doc/compatibility.md) for more information.

Getting started
---------------

There is a [mini tutorial](doc/mini-tutorial.md) and a [more comprehensive one](doc/tutorial.md).

The documentation is available on the [web](http://docs.seastar.io/master/index.html).


Resources
---------

* Seasatar Development Mailing List: Discuss challenges, propose improvements with
  sending code contributions (patches), and get help from experienced developers.
  Subscribe or browse archives: [here](https://groups.google.com/forum/#!forum/seastar-dev)
  (or email seastar-dev@googlegroups.com).
* GitHub Discussions: For more casual conversations and quick questions, consider
  using the Seastar project's [discussions on Github](https://github.com/scylladb/seastar/discussions).
* Issue Tracker: File bug reports on the project's [issue tracker](https://github.com/scylladb/seastar/issues).

Learn more about Seastar on the main [project website](http://seastar.io).

The Native TCP/IP Stack
-----------------------

Seastar comes with its own [userspace TCP/IP stack](doc/native-stack.md) for better performance.

Recommended hardware configuration for SeaStar
----------------------------------------------

* CPUs - As much as you need. SeaStar is highly friendly for multi-core and NUMA
* NICs - As fast as possible, we recommend 10G or 40G cards. It's possible to use
       1G too but you may be limited by their capacity.
       In addition, the more hardware queue per cpu the better for SeaStar.
       Otherwise we have to emulate that in software.
* Disks - Fast SSDs with high number of IOPS.
* Client machines - Usually a single client machine can't load our servers.
       Both memaslap (memcached) and WRK (httpd) cannot over load their matching
       server counter parts. We recommend running the client on different machine
       than the servers and use several of them.

Projects using Seastar
----------------------------------------------

* [cpv-cql-driver](https://github.com/cpv-project/cpv-cql-driver): C++ driver for Cassandra/Scylla based on seastar framework
* [cpv-framework](https://github.com/cpv-project/cpv-framework): A web framework written in c++ based on seastar framework
* [redpanda](https://vectorized.io/): A Kafka replacement for mission critical systems
* [Scylla](https://github.com/scylladb/scylla): A fast and reliable NoSQL data store compatible with Cassandra and DynamoDB
* [smf](https://github.com/smfrpc/smf): The fastest RPC in the West
* [Ceph - Crimson](https://github.com/ceph/ceph): Next-generation OSD (Object Storage Daemon) implementation based on the Seastar framework


================================================
FILE: apps/CMakeLists.txt
================================================
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Copyright (C) 2018 Scylladb, Ltd.
#

# Logical target for all applications.
add_custom_target (apps)

macro (seastar_add_app name)
  set (args ${ARGN})

  cmake_parse_arguments (
    parsed_args
    ""
    ""
    "SOURCES"
    ${args})

  set (target app_${name})
  add_executable (${target} ${parsed_args_SOURCES})

  target_include_directories (${target}
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

  target_link_libraries (${target}
    PRIVATE seastar_private)

  set_target_properties (${target}
    PROPERTIES
      OUTPUT_NAME ${name})

  add_dependencies (apps ${target})
endmacro ()

add_subdirectory (httpd)
add_subdirectory (io_tester)
add_subdirectory (rpc_tester)
add_subdirectory (iotune)
if (${Seastar_API_LEVEL} GREATER_EQUAL 9)
  add_subdirectory (memcached)
endif ()
add_subdirectory (seawreck)


================================================
FILE: apps/httpd/CMakeLists.txt
================================================
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Copyright (C) 2018 Scylladb, Ltd.
#

seastar_generate_swagger (
  TARGET app_httpd_swagger
  VAR app_httpd_swagger_files
  IN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/demo.json
  OUT_DIR ${CMAKE_CURRENT_BINARY_DIR})

seastar_add_app (httpd
  SOURCES
    ${app_httpd_swagger_files}
    main.cc)

target_include_directories (app_httpd
  PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

add_dependencies (app_httpd app_httpd_swagger)


================================================
FILE: apps/httpd/demo.json
================================================
{
    "apiVersion": "0.0.1",
    "swaggerVersion": "1.2",
    "basePath": "{{Protocol}}://{{Host}}",
    "resourcePath": "/hello",
    "produces": [
        "application/json"
    ],
    "apis": [
        {
            "path": "/hello/world/{var1}/{var2}",
            "operations": [
                {
                    "method": "GET",
                    "summary": "Returns the number of seconds since the system was booted",
                    "type": "long",
                    "nickname": "hello_world",
                    "produces": [
                        "application/json"
                    ],
                    "parameters": [
                    {
                     "name":"var2",
                     "description":"Full path of file or directory",
                     "required":true,
                     "allowMultiple":true,
                     "type":"string",
                     "paramType":"path"
                  },
                  {
                     "name":"var1",
                     "description":"Full path of file or directory",
                     "required":true,
                     "allowMultiple":false,
                     "type":"string",
                     "paramType":"path"
                  },
                    {
                     "name":"query_enum",
                     "description":"The operation to perform",
                     "required":true,
                     "allowMultiple":false,
                     "type":"string",
                     "paramType":"query",
                     "enum":["VAL1", "VAL2", "VAL3"]
                  	}
                    ]
                }
            ]
        }
    ],
    "models" : {
        "my_object": {
           "id": "my_object",
           "description": "Demonstrate an object",
               "properties": {
                "var1": {
                    "type": "string",
                    "description": "The first parameter in the path"
                },
                "var2": {
                    "type": "string",
                    "description": "The second parameter in the path"
                },
                "enum_var" : {
                    "type": "string",
                    "description": "Demonstrate an enum returned, note this is not the same enum type of the request",
                    "enum":["VAL1", "VAL2", "VAL3"]
                }
            }
        }
    }
}


================================================
FILE: apps/httpd/main.cc
================================================
/*
 * This file is open source software, licensed to you under the terms
 * of the Apache License, Version 2.0 (the "License").  See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.  You may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Copyright 2015 Cloudius Systems
 */

#include <memory>
#include <seastar/http/httpd.hh>
#include <seastar/http/handlers.hh>
#include <seastar/http/function_handlers.hh>
#include <seastar/http/file_handler.hh>
#include <seastar/core/seastar.hh>
#include <seastar/core/reactor.hh>
#include <seastar/core/app-template.hh>
#include "demo.json.hh"
#include <seastar/http/api_docs.hh>
#include <seastar/core/thread.hh>
#include <seastar/core/prometheus.hh>
#include <seastar/core/print.hh>
#include <seastar/net/inet_address.hh>
#include <seastar/util/defer.hh>
#include <seastar/net/api.hh>
#include "../lib/stop_signal.hh"

namespace bpo = boost::program_options;

using namespace seastar;
using namespace httpd;

class handl : public httpd::handler_base {
public:
    virtual future<std::unique_ptr<http::reply> > handle(const sstring& path,
            std::unique_ptr<http::request> req, std::unique_ptr<http::reply> rep) {
        rep->_content = "hello";
        rep->done("html");
        return make_ready_future<std::unique_ptr<http::reply>>(std::move(rep));
    }
};

void set_routes(routes& r) {
    function_handler* h1 = new function_handler([](const_req req) {
        return "hello";
    });
    function_handler* h2 = new function_handler([](std::unique_ptr<http::request> req) {
        return make_ready_future<json::json_return_type>("json-future");
    });
    r.add(operation_type::GET, url("/"), h1);
    r.add(operation_type::GET, url("/jf"), h2);
    r.add(operation_type::GET, url("/file").remainder("path"),
            new directory_handler("/"));
    r.add(operation_type::GET, url("/shard"), new function_handler([] (const_req req) {
        return seastar::sstring(fmt::format("{}", seastar::this_shard_id()));
    }));
    demo_json::hello_world.set(r, [] (const_req req) {
        demo_json::my_object obj;
        obj.var1 = req.param.at("var1");
        obj.var2 = req.param.at("var2");
        demo_json::ns_hello_world::query_enum v = demo_json::ns_hello_world::str2query_enum(req.get_query_param("query_enum"));
        // This demonstrate enum conversion
        obj.enum_var = v;
        return obj;
    });
}

int main(int ac, char** av) {
    app_template app;

    app.add_options()("port", bpo::value<uint16_t>()->default_value(10000), "HTTP Server port");
    app.add_options()("load-balancing-algorithm",
            bpo::value<std::string>()->default_value("connection_distribution"),
            "Load balancing algorithm: connection_distribution, port, fixed");
    app.add_options()("prometheus_port", bpo::value<uint16_t>()->default_value(9180), "Prometheus port. Set to zero in order to disable.");
    app.add_options()("prometheus_address", bpo::value<sstring>()->default_value("0.0.0.0"), "Prometheus address");
    app.add_options()("prometheus_prefix", bpo::value<sstring>()->default_value("seastar_httpd"), "Prometheus metrics prefix");

    return app.run(ac, av, [&] {
        return seastar::async([&] {
            seastar_apps_lib::stop_signal stop_signal;
            auto&& config = app.configuration();
            httpd::http_server_control prometheus_server;
            bool prometheus_started = false;

            auto stop_prometheus = defer([&] () noexcept {
                if (prometheus_started) {
                    std::cout << "Stoppping Prometheus server" << std::endl;  // This can throw, but won't.
                    prometheus_server.stop().get();
                }
            });

            uint16_t pport = config["prometheus_port"].as<uint16_t>();
            if (pport) {
                prometheus::config pctx;
                net::inet_address prom_addr(config["prometheus_address"].as<sstring>());

                pctx.prefix = config["prometheus_prefix"].as<sstring>();

                std::cout << "starting prometheus API server" << std::endl;
                prometheus_server.start("prometheus").get();

                prometheus::start(prometheus_server, pctx).get();

                prometheus_started = true;

                prometheus_server.listen(socket_address{prom_addr, pport}).handle_exception([prom_addr, pport] (auto ep) {
                    std::cerr << seastar::format("Could not start Prometheus API server on {}:{}: {}\n", prom_addr, pport, ep);
                    return make_exception_future<>(ep);
                }).get();

            }

            uint16_t port = config["port"].as<uint16_t>();
            auto server = std::make_unique<http_server_control>();
            auto rb = make_shared<api_registry_builder>("apps/httpd/");
            server->start().get();

            auto stop_server = defer([&] () noexcept {
                std::cout << "Stoppping HTTP server" << std::endl; // This can throw, but won't.
                server->stop().get();
            });

            server->set_routes(set_routes).get();
            server->set_routes([rb](routes& r){rb->set_api_doc(r);}).get();
            server->set_routes([rb](routes& r) {rb->register_function(r, "demo", "hello world application");}).get();

            auto lba_str = config["load-balancing-algorithm"].as<std::string>();
            server_socket::load_balancing_algorithm lba;
            if (lba_str == "connection_distribution") {
                lba = server_socket::load_balancing_algorithm::connection_distribution;
            } else if (lba_str == "port") {
                lba = server_socket::load_balancing_algorithm::port;
            } else if (lba_str == "fixed") {
                lba = server_socket::load_balancing_algorithm::fixed;
            } else {
                throw std::runtime_error("Invalid load balancing algorithm: " + lba_str);
            }

            listen_options lo;
            lo.lba = lba;
            server->listen(socket_address{net::inet_address{}, port}, lo).get();

            std::cout << "Seastar HTTP server listening on port " << port << " ...\n";

            stop_signal.wait().get();
            return 0;
        });
    });
}


================================================
FILE: apps/io_tester/CMakeLists.txt
================================================
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Copyright (C) 2018 Scylladb, Ltd.
#

seastar_add_app (io_tester
  SOURCES io_tester.cc)

seastar_add_app (ioinfo
  SOURCES ioinfo.cc)

target_link_libraries (app_io_tester
  PRIVATE yaml-cpp::yaml-cpp)

target_link_libraries (app_ioinfo
  PRIVATE yaml-cpp::yaml-cpp)


================================================
FILE: apps/io_tester/conf.yaml
================================================
- name: big_writes
  shards: all
  type: overwrite
  shard_info:
    parallelism: 10
    reqsize: 256kB
    shares: 10
    think_time: 0

- name: latency_reads
  shards: [0]
  type: randread
  data_size: 1GB
  shard_info:
    parallelism: 1
    reqsize: 512
    shares: 100
    think_time: 1000us

- name: cpu_hog
  shards: [0]
  type: cpu
  shard_info:
    parallelism: 1
    execution_time: 90us
    think_time: 10us

- name: unlinking
  shards: all
  type: unlink
  data_size: 2GB
  files_count: 5000
  shard_info:
    parallelism: 10
    think_time: 10us


================================================
FILE: apps/io_tester/io_tester.cc
================================================
/*
 * This file is open source software, licensed to you under the terms
 * of the Apache License, Version 2.0 (the "License").  See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.  You may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Copyright (C) 2017 ScyllaDB
 */
#include <seastar/core/app-template.hh>
#include <seastar/core/sharded.hh>
#include <seastar/core/reactor.hh>
#include <seastar/core/future.hh>
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/file.hh>
#include <seastar/core/sleep.hh>
#include <seastar/core/align.hh>
#include <seastar/core/timer.hh>
#include <seastar/core/thread.hh>
#include <seastar/core/print.hh>
#include <seastar/core/loop.hh>
#include <seastar/core/with_scheduling_group.hh>
#include <seastar/core/metrics_api.hh>
#include <seastar/core/io_intent.hh>
#include <seastar/util/assert.hh>
#include <seastar/util/later.hh>
#include <chrono>
#include <optional>
#include <ranges>
#include <utility>
#include <unordered_set>
#include <vector>
#include <boost/range/irange.hpp>
#include <boost/algorithm/string.hpp>

#pragma GCC diagnostic push
// see https://github.com/boostorg/accumulators/pull/54
#pragma GCC diagnostic ignored "-Wuninitialized"
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/max.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/p_square_quantile.hpp>
#include <boost/accumulators/statistics/extended_p_square.hpp>
#include <boost/accumulators/statistics/extended_p_square_quantile.hpp>
#pragma GCC diagnostic pop
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/array.hpp>
#include <iomanip>
#include <random>
#include <yaml-cpp/yaml.h>

using namespace seastar;
using namespace std::chrono_literals;
using namespace boost::accumulators;

static constexpr uint64_t extent_size_hint_alignment{1u << 20}; // 1MB

static auto random_seed = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
static thread_local std::default_random_engine random_generator(random_seed);

class context;
enum class request_type { seqread, overwrite, randread, randwrite, append, cpu, unlink };

namespace std {

template <>
struct hash<request_type> {
    size_t operator() (const request_type& type) const {
        return static_cast<size_t>(type);
    }
};

}

auto allocate_and_fill_buffer(size_t buffer_size) {
    constexpr size_t alignment{4096u};
    auto buffer = allocate_aligned_buffer<char>(buffer_size, alignment);

    std::uniform_int_distribution<int> fill('@', '~');
    memset(buffer.get(), fill(random_generator), buffer_size);

    return buffer;
}

future<file> create_and_fill_file(sstring name, uint64_t fsize, open_flags flags, file_open_options options, bool fill, bool fallocate) {
    auto f = co_await open_file_dma(name, flags, options);
    uint64_t pre_truncate_size = co_await f.size();
    co_await f.truncate(fsize);
    if (fallocate) {
        co_await f.allocate(0, fsize);
    }
    if (!fill || (pre_truncate_size >= fsize)) {
        co_return f;
    }

    const uint64_t buffer_size{256ul << 10};
    const uint64_t additional_iteration = (fsize % buffer_size == 0) ? 0 : 1;
    const uint64_t buffers_count{static_cast<uint64_t>(fsize / buffer_size) + additional_iteration};
    auto buffers_range = std::views::iota(UINT64_C(0), buffers_count);
    co_await max_concurrent_for_each(buffers_range.begin(), buffers_range.end(), 64, [f, buffer_size] (auto buffer_id) mutable {
            auto source_buffer = allocate_and_fill_buffer(buffer_size);
            auto write_position = buffer_id * buffer_size;
            return do_with(std::move(source_buffer), [f, write_position, buffer_size] (const auto& buffer) mutable {
                return f.dma_write(write_position, buffer.get(), buffer_size).discard_result();
            });
    });
    co_await f.flush();
    co_return f;
}

future<> busyloop_sleep(std::chrono::steady_clock::time_point until, std::chrono::steady_clock::time_point now) {
    return do_until([until] {
        return std::chrono::steady_clock::now() >= until;
    }, [] {
        return yield();
    });
}

template <typename Clock>
future<> timer_sleep(std::chrono::steady_clock::time_point until, std::chrono::steady_clock::time_point now) {
    return seastar::sleep<Clock>(std::chrono::duration_cast<std::chrono::microseconds>(until - now));
}

using sleep_fn = std::function<future<>(std::chrono::steady_clock::time_point until, std::chrono::steady_clock::time_point now)>;

class pause_distribution {
public:

    virtual std::chrono::duration<double> get() = 0;

    template <typename Dur>
    Dur get_as() {
        return std::chrono::duration_cast<Dur>(get());
    }

    virtual ~pause_distribution() {}
};

using pause_fn = std::function<std::unique_ptr<pause_distribution>(std::chrono::duration<double>)>;

class uniform_process : public pause_distribution {
    std::chrono::duration<double> _pause;

public:
    uniform_process(std::chrono::duration<double> period)
            : _pause(period)
    {
    }

    std::chrono::duration<double> get() override {
        return _pause;
    }
};

std::unique_ptr<pause_distribution> make_uniform_pause(std::chrono::duration<double> d) {
    return std::make_unique<uniform_process>(d);
}

class poisson_process : public pause_distribution {
    std::random_device _rd;
    std::mt19937 _rng;
    std::exponential_distribution<double> _exp;

public:
    poisson_process(std::chrono::duration<double> period)
            : _rng(_rd())
            , _exp(1.0 / period.count())
    {
    }

    std::chrono::duration<double> get() override {
        return std::chrono::duration<double>(_exp(_rng));
    }
};

std::unique_ptr<pause_distribution> make_poisson_pause(std::chrono::duration<double> d) {
    return std::make_unique<poisson_process>(d);
}

struct byte_size {
    uint64_t size;
};

struct duration_time {
    std::chrono::duration<float> time;
};

class shard_config {
    std::unordered_set<unsigned> _shards;
public:
    shard_config()
        : _shards(boost::copy_range<std::unordered_set<unsigned>>(boost::irange(0u, smp::count))) {}
    shard_config(std::unordered_set<unsigned> s) : _shards(std::move(s)) {}

    bool is_set(unsigned cpu) const {
        return _shards.count(cpu);
    }
};

struct shard_info {
    unsigned parallelism = 0;
    unsigned rps = 0;
    unsigned batch = 1;
    unsigned limit = std::numeric_limits<unsigned>::max();
    unsigned shares = 10;
    std::string sched_class = "";
    uint64_t request_size = 4 << 10;
    uint64_t bandwidth = 0;
    std::chrono::duration<float> think_time = 0ms;
    std::chrono::duration<float> think_after = 0ms;
    std::chrono::duration<float> execution_time = 1ms;
    seastar::scheduling_group scheduling_group = seastar::default_scheduling_group();
    bool vectorized = false;
    unsigned iov_count = 1;
};

struct options {
    bool dsync = false;
    ::sleep_fn sleep_fn = timer_sleep<lowres_clock>;
    ::pause_fn pause_fn = make_uniform_pause;
    // the value passed as a hint for allocated extent size
    // if not specified, then file_size is used as a hint
    std::optional<uint64_t> extent_allocation_size_hint;
    bool pre_allocate_blocks = false;
    std::optional<uint64_t> sloppy_size_hint;
};

class class_data;

struct job_config {
    std::string name;
    request_type type;
    shard_config shard_placement;
    ::shard_info shard_info;
    ::options options;
    // size of each individual file. Every class and every shard have its file, so in a normal
    // system with many shards we'll naturally have many files and that will push the data out
    // of the disk's cache. An exception to that rule is unlink_class_data, that creates files_count
    // files with file_size/files_count.
    uint64_t file_size;
    // the number of files to create and unlink by unlink_class_data per shard
    // remaining operations utilize only one file per shard
    std::optional<uint64_t> files_count;
    uint64_t offset_in_bdev;
    std::unique_ptr<class_data> gen_class_data();
};

struct sched_group_config {
    std::string name;
    std::string parent;
    unsigned shares;

    bool is_supergroup = false;
};

std::array<double, 4> quantiles = { 0.5, 0.95, 0.99, 0.999};
std::array<double, 2> quantiles_short = { 0.5, 0.9 };
static bool keep_files = false;

future<> maybe_remove_file(sstring fname) {
    return keep_files ? make_ready_future<>() : remove_file(fname);
}

future<> maybe_close_file(file& f) {
    return f ? f.close() : make_ready_future<>();
}

class class_data {
protected:
    using accumulator_type = accumulator_set<double, stats<tag::extended_p_square_quantile(quadratic), tag::mean, tag::max>>;

    job_config _config;
    uint64_t _alignment;

    seastar::scheduling_group _sg;

    size_t _data = 0;
    std::chrono::duration<float> _total_duration;

    std::chrono::steady_clock::time_point _start = {};
    accumulator_type _latencies;
    uint64_t _requests = 0;
    file _file;
    bool _think = false;
    ::sleep_fn _sleep_fn = timer_sleep<lowres_clock>;
    timer<> _thinker;

    virtual future<> do_start(sstring dir, directory_entry_type type) = 0;
    virtual future<size_t> issue_request(char *buf, io_intent* intent) = 0;
public:
    class_data(job_config cfg)
        : _config(std::move(cfg))
        , _alignment(_config.shard_info.request_size >= 4096 ? 4096 : 512)
        , _sg(cfg.shard_info.scheduling_group)
        , _latencies(extended_p_square_probabilities = quantiles)
        , _sleep_fn(_config.options.sleep_fn)
        , _thinker([this] { think_tick(); })
    {
        if (_config.shard_info.think_after > 0us) {
            _thinker.arm(std::chrono::duration_cast<std::chrono::microseconds>(_config.shard_info.think_after));
        } else if (_config.shard_info.think_time > 0us) {
            _think = true;
        }
    }

    virtual ~class_data() = default;

private:

    void think_tick() {
        if (_think) {
            _think = false;
            _thinker.arm(std::chrono::duration_cast<std::chrono::microseconds>(_config.shard_info.think_after));
        } else {
            _think = true;
            _thinker.arm(std::chrono::duration_cast<std::chrono::microseconds>(_config.shard_info.think_time));
        }
    }

    future<> issue_request(char* buf, io_intent* intent, std::chrono::steady_clock::time_point start, std::chrono::steady_clock::time_point stop) {
        return issue_request(buf, intent).then([this, start, stop] (auto size) {
            auto now = std::chrono::steady_clock::now();
            if (now < stop) {
                this->add_result(size, std::chrono::duration_cast<std::chrono::microseconds>(now - start));
            }
            return make_ready_future<>();
        });
    }

    future<> issue_requests_in_parallel(std::chrono::steady_clock::time_point stop) {
        return parallel_for_each(std::views::iota(0u, parallelism()), [this, stop] (auto dummy) mutable {
            auto bufptr = allocate_aligned_buffer<char>(this->req_size(), _alignment);
            auto buf = bufptr.get();
            return do_until([this, stop] { return std::chrono::steady_clock::now() > stop || requests() > limit(); }, [this, buf, stop] () mutable {
                auto start = std::chrono::steady_clock::now();
                return issue_request(buf, nullptr, start, stop).then([this] {
                    return think();
                });
            }).finally([bufptr = std::move(bufptr)] {});
        });
    }

    future<> issue_requests_at_rate(std::chrono::steady_clock::time_point stop) {
        return do_with(io_intent{}, 0u, [this, stop] (io_intent& intent, unsigned& in_flight) {
            return parallel_for_each(std::views::iota(0u, parallelism()), [this, stop, &intent, &in_flight] (auto dummy) mutable {
                auto bufptr = allocate_aligned_buffer<char>(this->req_size(), _alignment);
                auto buf = bufptr.get();
                auto pause = std::chrono::duration_cast<std::chrono::microseconds>(1s) / rps();
                auto pause_dist = _config.options.pause_fn(pause);
                return seastar::sleep((pause / parallelism()) * dummy).then([this, buf, stop, pause = pause_dist.get(), &intent, &in_flight] () mutable {
                    return do_until([this, stop] { return std::chrono::steady_clock::now() > stop || requests() > limit(); }, [this, buf, stop, pause, &intent, &in_flight] () mutable {
                        auto start = std::chrono::steady_clock::now();
                        in_flight++;
                        return parallel_for_each(std::views::iota(0u, batch()), [this, buf, &intent, start, stop] (auto dummy) {
                            return issue_request(buf, &intent, start, stop);
                        }).then([this, start, pause] {
                            auto now = std::chrono::steady_clock::now();
                            auto p = pause->template get_as<std::chrono::microseconds>();
                            auto next = start + p;

                            if (next > now) {
                                return this->_sleep_fn(next, now);
                            } else {
                                // probably the system cannot keep-up with this rate
                                return make_ready_future<>();
                            }
                        }).handle_exception_type([] (const cancelled_error&) {
                            // expected
                        }).finally([&in_flight] {
                            in_flight--;
                        });
                    });
                }).finally([bufptr = std::move(bufptr), pause = std::move(pause_dist)] {});
            }).then([&intent, &in_flight] {
                intent.cancel();
                return do_until([&in_flight] { return in_flight == 0; }, [] { return seastar::sleep(100ms /* ¯\_(ツ)_/¯ */); });
            });
        });
    }

public:
    future<> issue_requests(std::chrono::steady_clock::time_point stop) {
        _start = std::chrono::steady_clock::now();
        return with_scheduling_group(_sg, [this, stop] {
            if (rps() == 0) {
                return issue_requests_in_parallel(stop);
            } else {
                return issue_requests_at_rate(stop);
            }
        }).then([this] {
            _total_duration = std::chrono::steady_clock::now() - _start;
        });
    }

    future<> think() {
        if (_think) {
            return seastar::sleep(std::chrono::duration_cast<std::chrono::microseconds>(_config.shard_info.think_time));
        } else {
            return make_ready_future<>();
        }
    }
    // Generate the test file(s) for reads and writes alike. It is much simpler to just generate one file per job instead of expecting
    // job dependencies between creators and consumers. Removal of files is an exception - it creates multiple files during startup to
    // unlink them. So every job (a class in a shard) will have its own file(s) and will operate differently depending on the type:
    //
    // sequential reads  : will read the file from pos = 0 onwards, back to 0 on EOF
    // overwrites        : will write the file from pos = 0 onwards, back to 0 on EOF
    // random reads      : will read the file at random positions, between 0 and EOF
    // random writes     : will overwrite the file at a random position, between 0 and EOF
    // append            : will write to the file from pos = EOF onwards, always appending to the end.
    // unlink            : will unlink files created at the beginning of the execution
    // cpu               : CPU-only load, file is not created.
    future<> start(sstring dir, directory_entry_type type) {
        return do_start(dir, type).then([this] {
            if (this_shard_id() == 0 && _config.shard_info.bandwidth != 0) {
                return _sg.update_io_bandwidth(_config.shard_info.bandwidth);
            } else {
                return make_ready_future<>();
            }
        });
    }

    future<> stop() {
        return stop_hook().finally([this] {
            return maybe_close_file(_file);
        });
    }

    const sstring name() const {
        return _config.name;
    }

protected:
    sstring type_str() const {
        auto base = std::unordered_map<request_type, sstring>{
            { request_type::seqread, "SEQ READ" },
            { request_type::overwrite, "OVERWRITE" },
            { request_type::randread, "RAND READ" },
            { request_type::randwrite, "RAND WRITE" },
            { request_type::append , "APPEND" },
            { request_type::cpu , "CPU" },
            { request_type::unlink, "UNLINK" },
        }[_config.type];
        if (_config.shard_info.vectorized) {
            return format("{} (vectorized, {} iovecs)", base, _config.shard_info.iov_count);
        }
        return base;
    }

    request_type req_type() const {
        return _config.type;
    }

    sstring think_time() const {
        if (_config.shard_info.think_time == std::chrono::duration<float>(0)) {
            return "NO think time";
        } else {
            return format("{:d} us think time", std::chrono::duration_cast<std::chrono::microseconds>(_config.shard_info.think_time).count());
        }
    }

    size_t req_size() const {
        return _config.shard_info.request_size;
    }

    unsigned parallelism() const {
        return _config.shard_info.parallelism;
    }

    unsigned rps() const {
        return _config.shard_info.rps;
    }

    unsigned batch() const {
        return _config.shard_info.batch;
    }

    unsigned limit() const noexcept {
        return _config.shard_info.limit;
    }

    unsigned shares() const {
        return _config.shard_info.shares;
    }

    std::chrono::duration<float> total_duration() const {
        return _total_duration;
    }

    uint64_t file_size_mb() const {
        return _config.file_size >> 20;
    }

    uint64_t total_data() const {
        return _data;
    }

    uint64_t max_latency() const {
        return max(_latencies);
    }

    uint64_t average_latency() const {
        return mean(_latencies);
    }

    uint64_t quantile_latency(double q) const {
        return quantile(_latencies, quantile_probability = q);
    }

    uint64_t requests() const noexcept {
        return _requests;
    }

    void add_result(size_t data, std::chrono::microseconds latency) {
        _data += data;
        _latencies(latency.count());
        _requests++;
    }

public:
    virtual void emit_results(YAML::Emitter& out) = 0;
    virtual future<> stop_hook() {
        return make_ready_future<>();
    }
};

class io_class_data : public class_data {
    uint64_t _next_seq_pos = 0;
    uint64_t _offset = 0;
    unsigned _overflows = 0;
    std::uniform_int_distribution<uint32_t> _pos_distribution;
protected:
    bool _is_dev_null = false;
    timer<> _queue_length_timer;
    accumulator_type _disk_queue_lengths;

    future<size_t> on_io_completed(future<size_t> f) {
        if (!_is_dev_null) {
            return f;
        }

        return f.then([this] (auto size_f) {
            return make_ready_future<size_t>(this->req_size());
        });
    }

    bool is_random() const {
        return (req_type() == request_type::randread) || (req_type() == request_type::randwrite);
    }

    uint64_t get_pos() {
        uint64_t pos;
        if (is_random()) {
            pos = _pos_distribution(random_generator) * req_size();
        } else {
            pos = _next_seq_pos;
            _next_seq_pos += req_size();
            if (_next_seq_pos >= _config.file_size) {
                _overflows++;
                if (req_type() != request_type::append) {
                    _next_seq_pos = 0;
                }
            }
        }
        return pos + _offset;
    }

public:
    io_class_data(job_config cfg)
            : class_data(std::move(cfg))
            , _pos_distribution(0,  _config.file_size / _config.shard_info.request_size)
            , _queue_length_timer([this] { update_queue_length(); })
            , _disk_queue_lengths(extended_p_square_probabilities = quantiles_short)
    {}

    future<> do_start(sstring path, directory_entry_type type) override {
        return do_start_path(std::move(path), type).then([this] {
            _queue_length_timer.arm(std::chrono::steady_clock::now() + 500ms, 200ms);
        });
    }

private:
    void update_queue_length() {
        unsigned qlen = get_one_metrics("io_queue_disk_queue_length").value();
        _disk_queue_lengths(qlen);
    }

    future<> do_start_path(sstring path, directory_entry_type type) {
        if (type == directory_entry_type::directory) {
            return do_start_on_directory(path);
        }

        if (type == directory_entry_type::block_device) {
            return do_start_on_bdev(path);
        }

        if (type == directory_entry_type::char_device && path == "/dev/null") {
            return do_start_on_dev_null();
        }

        throw std::runtime_error(format("Unsupported storage. {} should be directory or block device", path));
    }

    future<> do_start_on_directory(sstring dir) {
        auto fname = format("{}/test-{}-{:d}", dir, name(), this_shard_id());
        auto flags = open_flags::rw | open_flags::create;
        if (_config.options.dsync) {
            flags |= open_flags::dsync;
        }
        file_open_options options;
        options.extent_allocation_size_hint = _config.options.extent_allocation_size_hint.value_or(_config.file_size);
        if (_config.options.sloppy_size_hint.has_value()) {
            options.sloppy_size = true;
            options.sloppy_size_hint = *_config.options.sloppy_size_hint;
        }
        options.append_is_unlikely = (req_type() != request_type::append);

        return create_and_fill_file(fname, _config.file_size, flags, options, req_type() != request_type::append, _config.options.pre_allocate_blocks).then([this](file f) {
            _file = std::move(f);
            return make_ready_future<>();
        }).then([fname] {
            // If keep_files == false, then the file shall not exist after the execution.
            // After the following function call the usage of the file is valid until `this->_file` object is closed.
            return maybe_remove_file(fname);
        });
    }

    future<> do_start_on_bdev(sstring name) {
        auto flags = open_flags::rw;
        if (_config.options.dsync) {
            flags |= open_flags::dsync;
        }

        return open_file_dma(name, flags).then([this] (auto f) {
            _file = std::move(f);
            return _file.size().then([this] (uint64_t size) {
                auto shard_area_size = align_down<uint64_t>(size / smp::count, 1 << 20);
                if (_config.offset_in_bdev + _config.file_size > shard_area_size) {
                    throw std::runtime_error("Data doesn't fit the blockdevice");
                }
                _offset = shard_area_size * this_shard_id() + _config.offset_in_bdev;
                return make_ready_future<>();
            });
        });
    }

    future<> do_start_on_dev_null() {
        file_open_options options;
        options.append_is_unlikely = true;
        return open_file_dma("/dev/null", open_flags::rw, std::move(options)).then([this] (auto f) {
            _file = std::move(f);
            _is_dev_null = true;
            return make_ready_future<>();
        });
    }

    std::optional<double> get_one_metrics(sstring m_name, bool check_class_metrics = true) {
        const auto& values = seastar::metrics::impl::get_value_map();
        const auto& mf = values.find(m_name);
        SEASTAR_ASSERT(mf != values.end());
        for (auto&& mi : mf->second) {
            if (check_class_metrics) {
                auto&& cname = mi.first.labels().find("class");
                if (cname == mi.first.labels().end() || cname->second.value() != name()) {
                    continue;
                }
            }
            return mi.second->get_function()().d();
        }
        return {};
    }

    void emit_one_metrics(YAML::Emitter& out, sstring m_name, bool check_class_metrics = true) {
        if (auto v = get_one_metrics(m_name, check_class_metrics); v.has_value()) {
            out << YAML::Key << m_name << YAML::Value << *v;
        }
    }

    void emit_metrics(YAML::Emitter& out) {
        emit_one_metrics(out, "io_queue_total_exec_sec");
        emit_one_metrics(out, "io_queue_total_delay_sec");
        emit_one_metrics(out, "io_queue_total_operations");
        emit_one_metrics(out, "io_queue_starvation_time_sec");
        emit_one_metrics(out, "io_queue_consumption");
        emit_one_metrics(out, "io_queue_adjusted_consumption");
        emit_one_metrics(out, "io_queue_activations");
        emit_one_metrics(out, "reactor_aio_outsizes", false);
    }

public:
    virtual void emit_results(YAML::Emitter& out) override {
        auto throughput_kbs = (total_data() >> 10) / total_duration().count();
        auto iops = requests() / total_duration().count();
        out << YAML::Key << "throughput" << YAML::Value << throughput_kbs << YAML::Comment("kB/s");
        out << YAML::Key << "IOPS" << YAML::Value << iops;
        out << YAML::Key << "latencies" << YAML::Comment("usec");
        out << YAML::BeginMap;
        out << YAML::Key << "average" << YAML::Value << average_latency();
        for (auto& q: quantiles) {
            out << YAML::Key << fmt::format("p{}", q) << YAML::Value << quantile_latency(q);
        }
        out << YAML::Key << "max" << YAML::Value << max_latency();
        out << YAML::EndMap;
        out << YAML::Key << "stats" << YAML::BeginMap;
        out << YAML::Key << "total_requests" << YAML::Value << requests();
        emit_metrics(out);
        out << YAML::Key << "disk_queue_length";
        out << YAML::BeginMap;
        for (auto& q: quantiles_short) {
            out << YAML::Key << fmt::format("p{}", q) << YAML::Value << (unsigned)quantile(_disk_queue_lengths, quantile_probability = q);
        }
        out << YAML::Key << "max" << YAML::Value << (unsigned)max(_disk_queue_lengths);
        out << YAML::EndMap;
        out << YAML::Key << "file_size_overflows" << YAML::Value << _overflows;
        out << YAML::EndMap;
    }
};

class read_io_class_data : public io_class_data {
public:
    read_io_class_data(job_config cfg) : io_class_data(std::move(cfg)) {}

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        auto f = _file.dma_read(this->get_pos(), buf, this->req_size(), intent);
        return on_io_completed(std::move(f));
    }
};

class write_io_class_data : public io_class_data {
public:
    write_io_class_data(job_config cfg) : io_class_data(std::move(cfg)) {}

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        auto f = _file.dma_write(this->get_pos(), buf, this->req_size(), intent);
        return on_io_completed(std::move(f));
    }
};

class vectorized_read_io_class_data : public io_class_data {
    std::vector<std::unique_ptr<char[], free_deleter>> _buffers;
    std::vector<iovec> _iovecs;
    size_t _segment_size;

public:
    vectorized_read_io_class_data(job_config cfg)
            : io_class_data(std::move(cfg))
            , _segment_size(_config.shard_info.request_size / _config.shard_info.iov_count)
    {
        if (_config.shard_info.request_size % _config.shard_info.iov_count != 0) {
            throw std::runtime_error(format("request_size {} must be evenly divisible by iov_count {}",
                _config.shard_info.request_size, _config.shard_info.iov_count));
        }
        if (_segment_size < _alignment || _segment_size % _alignment != 0) {
            throw std::runtime_error(format("segment_size {} must be at least {} and aligned to {}",
                _segment_size, _alignment, _alignment));
        }
        allocate_buffers();
    }

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        auto pos = this->get_pos();
        std::vector<iovec> iovs = _iovecs;
        auto f = _file.dma_read(pos, std::move(iovs), intent);
        return on_io_completed(std::move(f));
    }

private:
    void allocate_buffers() {
        _buffers.reserve(_config.shard_info.iov_count);
        _iovecs.reserve(_config.shard_info.iov_count);

        for (unsigned i = 0; i < _config.shard_info.iov_count; ++i) {
            auto buf = allocate_aligned_buffer<char>(_segment_size, _alignment);
            _iovecs.push_back(iovec{ buf.get(), _segment_size });
            _buffers.push_back(std::move(buf));
        }
    }
};

class vectorized_write_io_class_data : public io_class_data {
    std::vector<std::unique_ptr<char[], free_deleter>> _buffers;
    std::vector<iovec> _iovecs;
    size_t _segment_size;

public:
    vectorized_write_io_class_data(job_config cfg)
            : io_class_data(std::move(cfg))
            , _segment_size(_config.shard_info.request_size / _config.shard_info.iov_count)
    {
        if (_config.shard_info.request_size % _config.shard_info.iov_count != 0) {
            throw std::runtime_error(format("request_size {} must be evenly divisible by iov_count {}",
                _config.shard_info.request_size, _config.shard_info.iov_count));
        }
        if (_segment_size < _alignment || _segment_size % _alignment != 0) {
            throw std::runtime_error(format("segment_size {} must be at least {} and aligned to {}",
                _segment_size, _alignment, _alignment));
        }
        allocate_buffers();
    }

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        auto pos = this->get_pos();
        std::vector<iovec> iovs = _iovecs;
        auto f = _file.dma_write(pos, std::move(iovs), intent);
        return on_io_completed(std::move(f));
    }

private:
    void allocate_buffers() {
        _buffers.reserve(_config.shard_info.iov_count);
        _iovecs.reserve(_config.shard_info.iov_count);

        for (unsigned i = 0; i < _config.shard_info.iov_count; ++i) {
            auto buf = allocate_and_fill_buffer(_segment_size);
            _iovecs.push_back(iovec{ buf.get(), _segment_size });
            _buffers.push_back(std::move(buf));
        }
    }
};

class unlink_class_data : public class_data {
private:
    sstring _dir_path{};
    uint64_t _file_id_to_remove{0u};

public:
    unlink_class_data(job_config cfg) : class_data(std::move(cfg)) {
        if (!_config.files_count.has_value()) {
            throw std::runtime_error("request_type::unlink requires specifying 'files_count'");
        }
    }

    future<> do_start(sstring path, directory_entry_type type) override {
        if (type == directory_entry_type::directory) {
            return do_start_on_directory(path);
        }
        throw std::runtime_error(format("Unsupported storage. {} should be directory", path));
    }

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        if (all_files_removed()) {
            fmt::print("[WARNING]: Cannot issue request in unlink_class_data! All files have been removed for shard_id={}\n"
                       "[WARNING]: Please create more files or adjust the frequency of unlinks.", this_shard_id());
            return make_ready_future<size_t>(0u);
        }

        const auto fname = get_filename(_file_id_to_remove);
        ++_file_id_to_remove;

        return remove_file(fname).then([]{
            return make_ready_future<size_t>(0u);
        });
    }

    void emit_results(YAML::Emitter& out) override {
        const auto iops = requests() / total_duration().count();
        out << YAML::Key << "IOPS" << YAML::Value << iops;
        out << YAML::Key << "latencies" << YAML::Comment("usec");
        out << YAML::BeginMap;
        out << YAML::Key << "average" << YAML::Value << average_latency();
        out << YAML::Key << "max" << YAML::Value << max_latency();
        out << YAML::EndMap;
        out << YAML::Key << "stats" << YAML::BeginMap;
        out << YAML::Key << "total_requests" << YAML::Value << requests();
        out << YAML::EndMap;
    }

private:
    future<> stop_hook() override {
        if (all_files_removed() || keep_files) {
            return make_ready_future<>();
        }

        return max_concurrent_for_each(std::views::iota(_file_id_to_remove, files_count()), max_concurrency(), [this] (uint64_t file_id) {
            const auto fname = get_filename(file_id);
            return remove_file(fname);
        });
    }

    uint64_t files_count() const {
        return *_config.files_count;
    }

    uint64_t max_concurrency() const {
        // When we have many files it is easy to exceed the limit of open file descriptors.
        // To avoid that the limit is divided between shards (leaving some room for other jobs).
        return static_cast<uint64_t>((1024u / smp::count) * 0.8);
    }

    bool all_files_removed() const {
        return files_count() <= _file_id_to_remove;
    }

    sstring get_filename(uint64_t file_id) const {
        return format("{}/test-{}-shard-{:d}-file-{}", _dir_path, name(), this_shard_id(), file_id);
    }

    future<> do_start_on_directory(sstring path) {
        _dir_path = std::move(path);

        return max_concurrent_for_each(std::views::iota(UINT64_C(0), files_count()), max_concurrency(), [this] (uint64_t file_id) {
            const auto fname = get_filename(file_id);
            const auto fsize = align_up<uint64_t>(_config.file_size / files_count(), extent_size_hint_alignment);
            const auto flags = open_flags::rw | open_flags::create;

            file_open_options options;
            options.extent_allocation_size_hint = _config.options.extent_allocation_size_hint.value_or(fsize);
            options.append_is_unlikely = true;

            return create_and_fill_file(fname, fsize, flags, options, true, false).then([](file f) {
                return do_with(std::move(f), [] (auto& f) {
                    return f.close();
                });
            });
        });
    }
};

class cpu_class_data : public class_data {
public:
    cpu_class_data(job_config cfg) : class_data(std::move(cfg)) {}

    future<> do_start(sstring dir, directory_entry_type type) override {
        return make_ready_future<>();
    }

    future<size_t> issue_request(char *buf, io_intent* intent) override {
        // We do want the execution time to be a busy loop, and not just a bunch of
        // continuations until our time is up: by doing this we can also simulate the behavior
        // of I/O continuations in the face of reactor stalls.
        auto start  = std::chrono::steady_clock::now();
        do {
        } while ((std::chrono::steady_clock::now() - start) < _config.shard_info.execution_time);
        return make_ready_future<size_t>(1);
    }

    virtual void emit_results(YAML::Emitter& out) override {
        auto throughput = total_data() / total_duration().count();
        out << YAML::Key << "throughput" << YAML::Value << throughput;
    }
};

std::unique_ptr<class_data> job_config::gen_class_data() {
    if (type == request_type::cpu) {
        return std::make_unique<cpu_class_data>(*this);
    } else if (type == request_type::unlink) {
        return std::make_unique<unlink_class_data>(*this);
    } else if ((type == request_type::seqread) || (type == request_type::randread)) {
        if (shard_info.vectorized) {
            return std::make_unique<vectorized_read_io_class_data>(*this);
        }
        return std::make_unique<read_io_class_data>(*this);
    } else {
        if (shard_info.vectorized) {
            return std::make_unique<vectorized_write_io_class_data>(*this);
        }
        return std::make_unique<write_io_class_data>(*this);
    }
}

/// YAML parsing functions
namespace YAML {
template<>
struct convert<byte_size> {
    static bool decode(const Node& node, byte_size& bs) {
        auto str = node.as<std::string>();
        unsigned shift = 0;
        if (str.back() == 'B') {
            str.pop_back();
            shift = std::unordered_map<char, unsigned>{
                { 'k', 10 },
                { 'M', 20 },
                { 'G', 30 },
            }[str.back()];
            str.pop_back();
        }
        bs.size = (boost::lexical_cast<size_t>(str) << shift);
        return bs.size >= 512;
    }
};

template<>
struct convert<duration_time> {
    static bool decode(const Node& node, duration_time& dt) {
        auto str = node.as<std::string>();
        if (str == "0") {
            dt.time = 0ns;
            return true;
        }
        if (str.back() != 's') {
            return false;
        }
        str.pop_back();
        std::unordered_map<char, std::chrono::duration<float>> unit = {
            { 'n', 1ns },
            { 'u', 1us },
            { 'm', 1ms },
        };

        if (unit.count(str.back())) {
            auto u = str.back();
            str.pop_back();
            dt.time = (boost::lexical_cast<size_t>(str) * unit[u]);
        } else {
            dt.time = (boost::lexical_cast<size_t>(str) * 1s);
        }
        return true;
    }
};

template<>
struct convert<shard_config> {
    static bool decode(const Node& node, shard_config& shards) {
        try {
            auto str = node.as<std::string>();
            return (str == "all");
        } catch (YAML::TypedBadConversion<std::string>& e) {
            shards = shard_config(boost::copy_range<std::unordered_set<unsigned>>(node.as<std::vector<unsigned>>()));
            return true;
        }
        return false;
    }
};

template<>
struct convert<request_type> {
    static bool decode(const Node& node, request_type& rt) {
        static std::unordered_map<std::string, request_type> mappings = {
            { "seqread", request_type::seqread },
            { "overwrite", request_type::overwrite},
            { "randread", request_type::randread },
            { "randwrite", request_type::randwrite },
            { "append", request_type::append},
            { "cpu", request_type::cpu},
            { "unlink", request_type::unlink },
        };
        auto reqstr = node.as<std::string>();
        if (!mappings.count(reqstr)) {
            return false;
        }
        rt = mappings[reqstr];
        return true;
    }
};

template<>
struct convert<shard_info> {
    static bool decode(const Node& node, shard_info& sl) {
        if (node["parallelism"]) {
            sl.parallelism = node["parallelism"].as<unsigned>();
        }
        if (node["rps"]) {
            sl.rps = node["rps"].as<unsigned>();
        }
        if (node["batch"]) {
            sl.batch = node["batch"].as<unsigned>();
        }
        if (node["limit"]) {
            sl.limit = node["limit"].as<unsigned>();
        }

        if (node["shares"]) {
            sl.shares = node["shares"].as<unsigned>();
        } else if (node["class"]) {
            sl.sched_class = node["class"].as<std::string>();
        }
        if (node["bandwidth"]) {
            sl.bandwidth = node["bandwidth"].as<byte_size>().size;
        }
        if (node["reqsize"]) {
            sl.request_size = node["reqsize"].as<byte_size>().size;
        }
        if (node["think_time"]) {
            sl.think_time = node["think_time"].as<duration_time>().time;
        }
        if (node["think_after"]) {
            sl.think_after = node["think_after"].as<duration_time>().time;
        }
        if (node["execution_time"]) {
            sl.execution_time = node["execution_time"].as<duration_time>().time;
        }
        if (node["vectorized"]) {
            sl.vectorized = node["vectorized"].as<bool>();
        }
        if (node["iov_count"]) {
            sl.iov_count = node["iov_count"].as<unsigned>();
            if (sl.iov_count == 0) {
                throw std::runtime_error("iov_count must be at least 1");
            }
        }
        return true;
    }
};

template<>
struct convert<options> {
    static bool decode(const Node& node, options& op) {
        if (node["dsync"]) {
            op.dsync = node["dsync"].as<bool>();
        }
        if (node["sleep_type"]) {
            auto st = node["sleep_type"].as<std::string>();
            if (st == "busyloop") {
                op.sleep_fn = busyloop_sleep;
            } else if (st == "lowres") {
                op.sleep_fn = timer_sleep<lowres_clock>;
            } else if (st == "steady") {
                op.sleep_fn = timer_sleep<std::chrono::steady_clock>;
            } else {
                throw std::runtime_error(seastar::format("Unknown sleep_type {}", st));
            }
        }
        if (node["pause_distribution"]) {
            auto pd = node["pause_distribution"].as<std::string>();
            if (pd == "uniform") {
                op.pause_fn = make_uniform_pause;
            } else if (pd == "poisson") {
                op.pause_fn = make_poisson_pause;
            } else {
                throw std::runtime_error(seastar::format("Unknown pause_distribution {}", pd));
            }
        }
        // By default the file size is used as the allocation hint.
        // However, certain tests may require using a specific value (e.g. 32MB).
        if (node["extent_allocation_size_hint"]) {
            op.extent_allocation_size_hint = node["extent_allocation_size_hint"].as<byte_size>().size;
        }
        if (node["sloppy_size_hint"]) {
            op.sloppy_size_hint = node["sloppy_size_hint"].as<byte_size>().size;
        }
        if (node["fallocate"]) {
            op.pre_allocate_blocks = node["fallocate"].as<bool>();
        }

        return true;
    }
};

template<>
struct convert<job_config> {
    static bool decode(const Node& node, job_config& cl) {
        cl.name = node["name"].as<std::string>();
        cl.type = node["type"].as<request_type>();
        cl.shard_placement = node["shards"].as<shard_config>();
        // The data_size is used to divide the available (and effectively
        // constant) disk space between workloads. Each shard inside the
        // workload thus uses its portion of the assigned space.
        if (node["data_size"]) {
            const uint64_t per_shard_bytes = node["data_size"].as<byte_size>().size / smp::count;
            cl.file_size = align_up<uint64_t>(per_shard_bytes, extent_size_hint_alignment);
        } else if (cl.type == request_type::append) {
            cl.file_size = 0;
        } else {
            cl.file_size = 1ull << 30; // 1G by default
        }

        // By default a job may create 0 or 1 file.
        // That is not the case for unlink_class_data - it creates multiple
        // files that are unlinked during the execution.
        if (node["files_count"]) {
            cl.files_count = node["files_count"].as<uint64_t>();
        }

        if (node["shard_info"]) {
            cl.shard_info = node["shard_info"].as<shard_info>();
        }
        if (node["options"]) {
            cl.options = node["options"].as<options>();
        }

        return true;
    }
};

template<>
struct convert<sched_group_config> {
    static bool decode(const Node& node, sched_group_config& sc) {
        sc.name = node["name"].as<std::string>();
        sc.shares = node["shares"].as<unsigned>();
        if (node["parent"]) {
            sc.parent = node["parent"].as<std::string>();
        }
        return true;
    }
};
}

/// Each shard has one context, and the context is responsible for creating the classes that should
/// run in this shard.
class context {
    std::vector<std::unique_ptr<class_data>> _cl;

    sstring _dir;
    directory_entry_type _type;
    std::chrono::seconds _duration;

    semaphore _finished;
public:
    context(sstring dir, directory_entry_type dtype, std::vector<job_config> req_config, unsigned duration)
            : _cl(boost::copy_range<std::vector<std::unique_ptr<class_data>>>(req_config
                | boost::adaptors::filtered([] (auto& cfg) { return cfg.shard_placement.is_set(this_shard_id()); })
                | boost::adaptors::transformed([] (auto& cfg) { return cfg.gen_class_data(); })
            ))
            , _dir(dir)
            , _type(dtype)
            , _duration(duration)
            , _finished(0)
    {}

    future<> stop() {
        return parallel_for_each(_cl, [] (std::unique_ptr<class_data>& cl) {
            return cl->stop();
        });
    }

    future<> start() {
        return parallel_for_each(_cl, [this] (std::unique_ptr<class_data>& cl) {
            return cl->start(_dir, _type);
        });
    }

    future<> issue_requests() {
        return parallel_for_each(_cl.begin(), _cl.end(), [this] (std::unique_ptr<class_data>& cl) {
            return cl->issue_requests(std::chrono::steady_clock::now() + _duration).finally([this] {
                _finished.signal(1);
            });
        });
    }

    future<> emit_results(YAML::Emitter& out) {
        return _finished.wait(_cl.size()).then([this, &out] {
            for (auto& cl: _cl) {
                out << YAML::Key << cl->name();
                out << YAML::BeginMap;
                cl->emit_results(out);
                out << YAML::EndMap;
            }
            out << YAML::Key << "statistics";
            out << YAML::BeginMap;
            out << YAML::Key << "aio_retries" << YAML::Value << engine().get_io_stats().aio_retries;
            out << YAML::EndMap;
            return make_ready_future<>();
        });
    }
};

static void show_results(sharded<context>& ctx) {
    YAML::Emitter out;
    out << YAML::BeginDoc;
    out << YAML::BeginSeq;
    for (unsigned i = 0; i < smp::count; ++i) {
        out << YAML::BeginMap;
        out << YAML::Key << "shard" << YAML::Value << i;
        ctx.invoke_on(i, [&out] (auto& c) {
            return c.emit_results(out);
        }).get();
        out << YAML::EndMap;
    }
    out << YAML::EndSeq;
    out << YAML::EndDoc;
    std::cout << out.c_str();
}

int main(int ac, char** av) {
    namespace bpo = boost::program_options;

    app_template app;
    auto opt_add = app.add_options();
    opt_add
        ("storage", bpo::value<sstring>()->default_value("."), "directory or block device where to execute the test")
        ("duration", bpo::value<unsigned>()->default_value(10), "for how long (in seconds) to run the test")
        ("conf", bpo::value<sstring>()->default_value("./conf.yaml"), "YAML file containing benchmark specification")
        ("keep-files", bpo::value<bool>()->default_value(false), "keep test files, next run may re-use them")
        ("sched-groups", bpo::value<sstring>(), "YAML file containing scheduling groups configuration")
    ;

    sharded<context> ctx;
    return app.run(ac, av, [&] {
        return seastar::async([&] {
            auto& opts = app.configuration();
            auto& storage = opts["storage"].as<sstring>();

            auto st_type = engine().file_type(storage).get();

            if (!st_type) {
                throw std::runtime_error(format("Unknown storage {}", storage));
            }

            if (*st_type == directory_entry_type::directory) {
                auto fs = file_system_at(storage).get();
                if (fs != fs_type::xfs) {
                    std::cout << "WARNING!!! This is a performance test. " << storage << " is not on XFS" << std::endl;
                }
            }

            keep_files = opts["keep-files"].as<bool>();
            auto& duration = opts["duration"].as<unsigned>();
            auto& yaml = opts["conf"].as<sstring>();
            YAML::Node doc = YAML::LoadFile(yaml);
            auto reqs = doc.as<std::vector<job_config>>();

            struct sched_class {
                seastar::scheduling_group sg;
                seastar::scheduling_supergroup ssg;
            };
            std::unordered_map<std::string, sched_class> sched_classes;

            if (opts.contains("sched-groups")) {
                auto& yaml = opts["sched-groups"].as<sstring>();
                YAML::Node doc = YAML::LoadFile(yaml);
                auto sched_config = doc.as<std::vector<sched_group_config>>();

                // First, find out which sched_group_config-s are supergroups
                for (auto& sg : sched_config) {
                    if (sg.parent.empty()) {
                        continue;
                    }

                    auto parent = std::find_if(sched_config.begin(), sched_config.end(), [&sg] (auto& s) { return s.name == sg.parent; });
                    if (parent == sched_config.end()) {
                        throw std::runtime_error(fmt::format("Unknown parent sched group {} for {} in config", sg.parent, sg.name));
                    }
                    parent->is_supergroup = true;
                }

                // Second, create the supergroups
                parallel_for_each(sched_config, [&sched_classes] (auto& g) {
                    if (!g.is_supergroup) {
                        return make_ready_future<>();
                    }

                    fmt::print("Creating {} supergroup\n", g.name);
                    return seastar::create_scheduling_supergroup(g.shares).then([&g, &sched_classes] (seastar::scheduling_supergroup ssg) {
                        sched_classes.insert(std::make_pair(g.name, sched_class { .ssg = ssg }));
                    });
                }).get();

                // Finally, create the sched groups
                parallel_for_each(sched_config, [&sched_classes] (auto& g) {
                    if (g.is_supergroup) {
                        return make_ready_future<>();
                    }

                    seastar::scheduling_supergroup parent;
                    if (!g.parent.empty()) {
                        fmt::print("Creating {}.{} group\n", g.parent, g.name);
                        parent = sched_classes.at(g.parent).ssg;
                    } else {
                        fmt::print("Creating {} group\n", g.name);
                    }
                    return seastar::create_scheduling_group(g.name, g.name, g.shares, parent).then([&g, &sched_classes] (seastar::scheduling_group sg) {
                        sched_classes.insert(std::make_pair(g.name, sched_class { .sg = sg }));
                    });
                }).get();
            }

            parallel_for_each(reqs, [&sched_classes] (auto& r) {
                if (r.shard_info.sched_class != "") {
                    return make_ready_future<>();
                }

                fmt::print("Creating {} group (by job name)\n", r.name);
                return seastar::create_scheduling_group(r.name, r.shard_info.shares).then([&r, &sched_classes] (seastar::scheduling_group sg) {
                    sched_classes.insert(std::make_pair(r.name, sched_class {
                        .sg = sg,
                    }));
                });
            }).get();

            for (job_config& r : reqs) {
                auto cname = r.shard_info.sched_class != "" ? r.shard_info.sched_class : r.name;
                fmt::print("Job {} -> sched class {}\n", r.name, cname);
                auto& sc = sched_classes.at(cname);
                r.shard_info.scheduling_group = sc.sg;
            }

            if (*st_type == directory_entry_type::block_device) {
                uint64_t off = 0;
                for (job_config& r : reqs) {
                    r.offset_in_bdev = off;
                    off += r.file_size;
                }
            }

            ctx.start(storage, *st_type, reqs, duration).get();
            internal::at_exit([&ctx] {
                return ctx.stop();
            });
            std::cout << "Creating initial files..." << std::endl;
            ctx.invoke_on_all([] (auto& c) {
                return c.start();
            }).get();
            std::cout << "Starting evaluation..." << std::endl;
            ctx.invoke_on_all([] (auto& c) {
                return c.issue_requests();
            }).get();
            show_results(ctx);
            ctx.stop().get();
        }).or_terminate();
    });
}


================================================
FILE: apps/io_tester/ioinfo.cc
================================================
/*
 * This file is open source software, licensed to you under the terms
 * of the Apache License, Version 2.0 (the "License").  See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.  You may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Copyright (C) 2021 ScyllaDB
 */
#include <iostream>
#include <seastar/core/app-template.hh>
#include <seastar/core/thread.hh>
#include <seastar/core/reactor.hh>
#include <seastar/core/io_queue.hh>
#include <seastar/util/closeable.hh>
#include <yaml-cpp/yaml.h>

using namespace seastar;

int main(int ac, char** av) {
    namespace bpo = boost::program_options;

    app_template app;
    auto opt_add = app.add_options();
    opt_add
        ("directory", bpo::value<sstring>()->default_value("."), "directory to work on")
        ("max-reqsize", bpo::value<unsigned>()->default_value(128u * 1024u), "maximum request size in bytes used when calculating capacity (default: 128kB)")
    ;

    return app.run(ac, av, [&] {
        return seastar::async([&] {
            auto& opts = app.configuration();
            auto& storage = opts["directory"].as<sstring>();
            auto max_reqsz = opts["max-reqsize"].as<unsigned>();

            YAML::Emitter out;
            out << YAML::BeginDoc;
            out << YAML::BeginMap;

            engine().open_file_dma(storage + "/tempfile", open_flags::rw | open_flags::create | open_flags::exclusive).then([&] (file f) {
                return with_closeable(std::move(f), [&out, &storage, max_reqsz] (file& f) {
                    return remove_file(storage + "/tempfile").then([&out, &f] {
                        out << YAML::Key << "disk_read_max_length" << YAML::Value << f.disk_read_max_length();
                        out << YAML::Key << "disk_write_max_length" << YAML::Value << f.disk_write_max_length();
                    }).then([&out, &f, max_reqsz] {
                        return f.stat().then([&out, max_reqsz] (auto st) {
                            auto& ioq = engine().get_io_queue(st.st_dev);
                            auto& cfg = ioq.get_config();

                            out << YAML::Key << "device" << YAML::Value << st.st_dev;
                            out << YAML::Key << "io_latency_goal_ms" << YAML::Value <<
                                    std::chrono::duration_cast<std::chrono::duration<double, std::milli>>(ioq.get_io_latency_goal()).count();
                            out << YAML::Key << "io_queue" << YAML::BeginMap;
                            out << YAML::Key << "id" << YAML::Value << ioq.id();
                            out << YAML::Key << "req_count_rate" << YAML::Value << cfg.req_count_rate;
                            out << YAML::Key << "blocks_count_rate" << YAML::Value << cfg.blocks_count_rate;
                            out << YAML::Key << "disk_req_write_to_read_multiplier" << YAML::Value << cfg.disk_req_write_to_read_multiplier;
                            out << YAML::Key << "disk_blocks_write_to_read_multiplier" << YAML::Value << cfg.disk_blocks_write_to_read_multiplier;
                            out << YAML::EndMap;

                            out << YAML::Key << "fair_queue" << YAML::BeginMap;
                            out << YAML::Key << "capacities" << YAML::BeginMap;
                            for (size_t sz = 512; sz <= max_reqsz; sz <<= 1) {
                                out << YAML::Key << sz << YAML::BeginMap;
                                out << YAML::Key << "read" << YAML::Value << ioq.request_capacity(internal::io_direction_and_length(internal::io_direction_and_length::read_idx, sz));
                                out << YAML::Key << "write" << YAML::Value << ioq.request_capacity(internal::io_direction_and_length(internal::io_direction_and_length::write_idx, sz));
                                out << YAML::EndMap;
                            }
                            out << YAML::EndMap;

                            const auto& fg = internal::get_throttler(ioq, internal::io_direction_and_length::write_idx);
                            out << YAML::Key << "per_tick_grab_threshold" << YAML::Value << fg.per_tick_grab_threshold();

                            const auto& tb = fg.token_bucket();
                            out << YAML::Key << "token_bucket" << YAML::BeginMap;
                            out << YAML::Key << "limit" << YAML::Value << tb.limit();
                            out << YAML::Key << "rate" << YAML::Value << tb.rate();
                            out << YAML::Key << "threshold" << YAML::Value << tb.threshold();
                            out << YAML::EndMap;

                            out << YAML::EndMap;
                        });
                    });
                });
            }).get();

            out << YAML::EndMap;
            out << YAML::EndDoc;
            std::cout << out.c_str();
        });
    });
}


================================================
FILE: apps/io_tester/sched.yaml
================================================
- name: statement
  shares: 1000

- name: maintenance
  shares: 100

- name: compaction
  shares: 200
  parent: maintenance

- name: backup
  shares: 100
  parent: maintenance


================================================
FILE: apps/iotune/CMakeLists.txt
================================================
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Copyright (C) 2018 Scylladb, Ltd.
#

seastar_add_app (iotune
  SOURCES iotune.cc)

target_link_libraries (app_iotune
  PRIVATE
    yaml-cpp::yaml-cpp)


================================================
FILE: apps/iotune/iotune.cc
================================================
/*
 * This file is open source software, licensed to you under the terms
 * of the Apache License, Version 2.0 (the "License").  See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.  You may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Copyright (C) 2018 ScyllaDB
 *
 * The goal of this program is to allow a user to properly configure the Seastar I/O
 * scheduler.
 */
#include <iostream>
#include <chrono>
#include <optional>
#include <random>
#include <memory>
#include <map>
#include <ranges>
#include <vector>
#include <cmath>
#include <sys/vfs.h>
#include <sys/sysmacros.h>
#include <boost/program_options.hpp>
#include <boost/iterator/counting_iterator.hpp>
#include <fstream>
#include <wordexp.h>
#include <yaml-cpp/yaml.h>
#include <fmt/printf.h>
#include <fmt/ranges.h>
#include <seastar/core/seastar.hh>
#include <seastar/core/file.hh>
#include <seastar/core/thread.hh>
#include <seastar/core/sstring.hh>
#include <seastar/core/posix.hh>
#include <seastar/core/aligned_buffer.hh>
#include <seastar/core/sharded.hh>
#include <seastar/core/app-template.hh>
#include <seastar/core/shared_ptr.hh>
#include <seastar/core/fsqual.hh>
#include <seastar/core/loop.hh>
#include <seastar/util/defer.hh>
#include <seastar/util/log.hh>
#include <seastar/util/std-compat.hh>
#include <seastar/util/read_first_line.hh>

using namespace seastar;
using namespace std::chrono_literals;
namespace fs = std::filesystem;

logger iotune_logger("iotune");

using iotune_clock = std::chrono::steady_clock;
static thread_local std::default_random_engine random_generator(std::chrono::duration_cast<std::chrono::nanoseconds>(iotune_clock::now().time_since_epoch()).count());

void check_device_properties(fs::path dev_sys_file) {
    auto sched_file = dev_sys_file / "queue" / "scheduler";
    auto sched_string = read_first_line(sched_file);
    auto beg = sched_string.find('[');
    size_t len = sched_string.size();
    if (beg == sstring::npos) {
        beg = 0;
    } else {
        auto end = sched_string.find(']');
        if (end != sstring::npos) {
            len = end - beg - 1;
        }
        beg++;
    }
    auto scheduler = sched_string.substr(beg, len);
    if ((scheduler != "noop") && (scheduler != "none")) {
        iotune_logger.warn("Scheduler for {} set to {}. It is recommend to set it to noop before evaluation so as not to skew the results.",
                sched_file.string(), scheduler);
    }

    auto nomerges_file = dev_sys_file / "queue" / "nomerges";
    auto nomerges = read_first_line_as<unsigned>(nomerges_file);
    if (nomerges != 2u) {
        iotune_logger.warn("nomerges for {} set to {}. It is recommend to set it to 2 before evaluation so that merges are disabled. Results can be skewed otherwise.",
                nomerges_file.string(), nomerges);
    }

    auto write_cache_file = dev_sys_file / "queue" / "write_cache";
    auto write_cache = read_first_line_as<std::string>(write_cache_file);
    if (write_cache == "write back") {
        iotune_logger.warn("write_cache for {} is set to write back. Some disks have poor implementation of this mode, pay attention to the measurements accuracy.",
                write_cache_file.string());
    }
}

struct evaluation_directory {
    sstring _name;
    // We know that if we issue more than this, they will be blocked on linux anyway.
    unsigned _max_iodepth = 0;
    unsigned _force_io_depth;
    uint64_t _available_space;
    uint64_t _min_data_transfer_size = 512;
    unsigned _disks_per_array = 0;
    std::optional<uint64_t> _reported_physical_block_size;

    void scan_device(unsigned dev_maj, unsigned dev_min) {
        scan_device(fmt::format("{}:{}", dev_maj, dev_min));
    }

    void scan_device(std::string dev_str) {
        scan_device(fs::path("/sys/dev/block") / dev_str);
    }

    void scan_device(fs::path sys_file) {
        try {
            sys_file = fs::canonical(sys_file);
            bool is_leaf = true;
            if (fs::exists(sys_file / "slaves")) {
                for (auto& dev : fs::directory_iterator(sys_file / "slaves")) {
                    is_leaf = false;
                    scan_device(read_first_line(dev.path() / "dev"));
                }
            }

            // our work is done if not leaf. We'll tune the leaves
            if (!is_leaf) {
                return;
            }

            if (fs::exists(sys_file / "partition")) {
                scan_device(sys_file.remove_filename());
            } else {
                check_device_properties(sys_file);
                auto queue_dir = sys_file / "queue";
                auto disk_min_io_size = read_first_line_as<uint64_t>(queue_dir / "minimum_io_size");

                _min_data_transfer_size = std::max(_min_data_transfer_size, disk_min_io_size);
                _max_iodepth += read_first_line_as<uint64_t>(queue_dir / "nr_requests");

                // Read physical_block_size from sysfs for comparison with detected value
                if (!_reported_physical_block_size) {
                    auto pbs_file = queue_dir / "physical_block_size";
                    if (fs::exists(pbs_file)) {
                        _reported_physical_block_size = read_first_line_as<uint64_t>(pbs_file);
                    }
                }

                _disks_per_array++;
            }
        } catch (std::system_error& se) {
            iotune_logger.error("Error while parsing sysfs. Will continue with guessed values: {}", se.what());
            _max_iodepth = 128;
        }
        if (_force_io_depth != 0) {
            _max_iodepth = _force_io_depth;
        }
        _disks_per_array = std::max(_disks_per_array, 1u);
    }
public:
    evaluation_directory(sstring name, unsigned force_io_depth)
        : _name(name)
        , _force_io_depth(force_io_depth)
        , _available_space(fs::space(fs::path(_name)).available)
    {}

    unsigned max_iodepth() const {
        return _max_iodepth;
    }

    fs::path path() const {
        return fs::path(_name);
    }

    const sstring& name() const {
        return _name;
    }

    unsigned disks_per_array() const {
        return _disks_per_array;
    }

    uint64_t minimum_io_size() const {
        return _min_data_transfer_size;
    }

    std::optional<uint64_t> reported_physical_block_size() const {
        return _reported_physical_block_size;
    }

    future<> discover_directory() {
        return seastar::async([this] {
            auto f = open_directory(_name).get();
            auto st = f.stat().get();
            f.close().get();

            scan_device(major(st.st_dev), minor(st.st_dev));
        });
    }

    uint64_t available_space() const {
        return _available_space;
    }
};

struct io_rates {
    float bytes_per_sec = 0;
    float iops = 0;
    io_rates operator+(const io_rates& a) const {
        return io_rates{bytes_per_sec + a.bytes_per_sec, iops + a.iops};
    }

    io_rates& operator+=(const io_rates& a) {
        bytes_per_sec += a.bytes_per_sec;
        iops += a.iops;
        return *this;
    }
};

struct row_stats {
    size_t points;
    double average;
    double stdev;

    float stdev_percents() const {
        return points > 0 ? stdev / average : 0.0;
    }
};

template <typename T>
static row_stats get_row_stats_for(const std::vector<T>& v) {
    if (v.size() == 0) {
        return row_stats{0, 0.0, 0.0};
    }

    double avg = std::accumulate(v.begin(), v.end(), 0.0) / v.size();
    double stdev = std::sqrt(std::transform_reduce(v.begin(), v.end(), 0.0,
                std::plus<double>(), [avg] (auto& v) -> double { return (v - avg) * (v - avg); }) / v.size());

    return row_stats{ v.size(), avg, stdev };
}

class invalid_position : public std::exception {
public:
    virtual const char* what() const noexcept {
        return "file access position invalid";
    }
};

struct position_generator {
    virtual uint64_t get_pos() = 0;
    virtual bool is_sequential() const = 0;
    virtual ~position_generator() {}
};

class sequential_issuer : public position_generator {
    size_t _buffer_size;
    uint64_t _position = 0;
    uint64_t _size_limit;
public:
    sequential_issuer(size_t buffer_size, uint64_t size_limit)
        : _buffer_size(buffer_size)
        , _size_limit(size_limit)
    {}

    virtual bool is_sequential() const {
        return true;
    }

    virtual uint64_t get_pos() {
        if (_position >= _size_limit) {
            // Wrap around if reaching EOF. The write bandwidth is lower,
            // and we also split the write bandwidth among shards, while we
            // read only from shard 0, so shard 0's file may not be large
            // enough to read from.
            _position = 0;
        }
        auto pos = _position;
        _position += _buffer_size;
        return pos;
    }
};

class random_issuer : public position_generator {
    size_t _buffer_size;
    uint64_t _last_position;
    std::uniform_int_distribution<uint64_t> _pos_distribution;
public:
    random_issuer(size_t buffer_size, uint64_t last_position)
        : _buffer_size(buffer_size)
        , _last_position(last_position)
        , _pos_distribution(0, (last_position / buffer_size) - 1)
    {}

    virtual bool is_sequential() const {
        return false;
    }

    virtual uint64_t get_pos() {
        uint64_t pos = _pos_distribution(random_generator) * _buffer_size;
        if (pos >= _last_position) {
            throw invalid_position();
        }
        return pos;
    }
};

class request_issuer {
public:
    virtual future<size_t> issue_request(uint64_t pos, char* buf, uint64_t size) = 0;
    virtual ~request_issuer() {}
};


class write_request_issuer : public request_issuer {
    file _file;
public:
    explicit write_request_issuer(file f) : _file(f) {}
    future<size_t> issue_request(uint64_t pos, char* buf, uint64_t size) override {
        return _file.dma_write(pos, buf, size);
    }
};

class read_request_issuer : public request_issuer {
    file _file;
public:
    explicit read_request_issuer(file f) : _file(f) {}
    future<size_t> issue_request(uint64_t pos, char* buf, uint64_t size) override {
        return _file.dma_read(pos, buf, size);
    }
};

std::chrono::duration<double>
warmup_period(std::chrono::duration<double> duration) {
    auto min_warmup = 3s;
    auto five_percent = duration * 0.05;
    return std::max(min_warmup, std::chrono::duration_cast<std::chrono::seconds>(five_percent));
}

class io_worker {
    class requests_rate_meter {
        std::vector<unsigned> _rates;
        // Passed in rates might be reused so we locally track in our own vector
        // (such that we can modify that list) and append later.
        std::vector<unsigned>& _parent_rates;
        const unsigned& _requests;
        unsigned _prev_requests = 0;
        std::chrono::duration<double> _duration;
        timer<> _tick;
        bool _with_warmup;

        static constexpr auto period = 1s;

    public:
        requests_rate_meter(std::chrono::duration<double> duration, std::vector<unsigned>& rates, const unsigned& requests, bool with_warmup)
            : _rates()
            , _parent_rates(rates)
            , _requests(requests)
            , _duration(duration)
            , _tick([this] {
                _rates.push_back(_requests - _prev_requests);
                _prev_requests = _requests;
            })
            , _with_warmup(with_warmup)
        {
            _rates.reserve(256); // ~2 minutes
            if (duration > 4 * period) {
                _tick.arm_periodic(period);
            }
        }

        ~requests_rate_meter() {
            if (_tick.armed()) {
                _tick.cancel();
            } else {
                _rates.push_back(_requests);
            }

            // Drop samples that got measured during the warm up period.
            // We drop an extra sample. This is because the one second timer
            // logic is really independent of when we start counting requests in
            // `issue_request` itself so the first bucket might not be a full
            // measurement and cause skew otherwise.
            size_t samples_to_drop = _with_warmup ? warmup_period(_duration) / period + 1 : 0;
            _rates.erase(_rates.begin(), _rates.begin() + std::min(samples_to_drop, _rates.size()));
            _parent_rates.insert(_parent_rates.end(), _rates.begin(), _rates.end());
        }
    };

    uint64_t _bytes = 0;
    uint64_t _max_offset = 0;
    unsigned _requests = 0;
    size_t _buffer_size;
    std::chrono::time_point<iotune_clock, std::chrono::duration<double>> _start_measuring;
    std::chrono::time_point<iotune_clock, std::chrono::duration<double>> _end_measuring;
    std::chrono::time_point<iotune_clock, std::chrono::duration<double>> _end_load;
    // track separately because in the sequential case we may exhaust the file before _duration
    std::chrono::time_point<iotune_clock, std::chrono::duration<double>> _last_time_seen;

    requests_rate_meter _rr_meter;
    std::unique_ptr<position_generator> _pos_impl;
    std::unique_ptr<request_issuer> _req_impl;
public:
    bool is_sequential() const {
        return _pos_impl->is_sequential();
    }

    bool should_stop() const {
        return iotune_clock::now() >= _end_load;
    }

    io_worker(size_t buffer_size, std::chrono::duration<double> duration, std::unique_ptr<request_issuer> reqs, std::unique_ptr<position_generator> pos, std::vector<unsigned>& rates, bool with_warmup = true)
        : _buffer_size(buffer_size)
        , _start_measuring(iotune_clock::now() + (with_warmup ? std::chrono::duration<double>(warmup_period(duration)) : 0s))
        , _end_measuring(_start_measuring + duration)
        , _end_load(_end_measuring + 10ms)
        , _last_time_seen(_start_measuring)
        , _rr_meter(duration, rates, _requests, with_warmup)
        , _pos_impl(std::move(pos))
        , _req_impl(std::move(reqs))
    {}

    std::unique_ptr<char[], free_deleter> get_buffer() {
        return allocate_aligned_buffer<char>(_buffer_size, _buffer_size);
    }

    future<> issue_request(char* buf) {
        uint64_t pos = _pos_impl->get_pos();
        return _req_impl->issue_request(pos, buf, _buffer_size).then([this, pos] (size_t size) {
            auto now = iotune_clock::now();
            _max_offset = std::max(_max_offset, pos + size);
            if ((now > _start_measuring) && (now < _end_measuring)) {
                _last_time_seen = now;
                _bytes += size;
                _requests++;
            }
        });
    }

    uint64_t max_offset() const noexcept { return _max_offset; }

    io_rates get_io_rates() const {
        io_rates rates;
        auto t = _last_time_seen - _start_measuring;
        if (!t.count()) {
            throw std::runtime_error("No data collected");
        }
        rates.bytes_per_sec = _bytes / t.count();
        rates.iops = _requests / t.count();
        return rates;
    }
};

class test_file {
public:
    enum class pattern { sequential, random };
    enum class access_type { read, write };
private:
    fs::path _dirpath;
    uint64_t _file_size;
    file _file;
    uint64_t _forced_random_write_io_buffer_size;
    uint64_t _forced_random_read_io_buffer_size;

    std::unique_ptr<position_generator> get_position_generator(size_t buffer_size, pattern access_pattern) {
        if (access_pattern == pattern::sequential) {
            return std::make_unique<sequential_issuer>(buffer_size, _file_size);
        } else {
            return std::make_unique<random_issuer>(buffer_size, _file_size);
        }
    }

    uint64_t calculate_buffer_size(pattern access_pattern, uint64_t buffer_size, uint64_t operation_alignment, access_type io_type) const {
        if (access_pattern == pattern::random) {
            if(io_type == access_type::write && _forced_random_write_io_buffer_size != 0u) {
                return _forced_random_write_io_buffer_size;
            }
            if(io_type == access_type::read && _forced_random_read_io_buffer_size != 0u) {
                return _forced_random_read_io_buffer_size;
            }
        }

        return std::max(buffer_size, operation_alignment);
    }

public:
    test_file(const ::evaluation_directory& dir, uint64_t maximum_size, uint64_t random_write_io_buffer_size, uint64_t random_read_io_buffer_size)
        : _dirpath(dir.path() / fs::path(fmt::format("ioqueue-discovery-{}", this_shard_id())))
        , _file_size(maximum_size)
        , _forced_random_write_io_buffer_size(random_write_io_buffer_size)
        , _forced_random_read_io_buffer_size(random_read_io_buffer_size)
    {}

    future<> create_data_file() {
        // XFS likes access in many directories better.
        return make_directory(_dirpath.string()).then([this] {
            auto testfile = _dirpath / fs::path("testfile");
            file_open_options options;
            options.extent_allocation_size_hint = _file_size;
            return open_file_dma(testfile.string(), open_flags::rw | open_flags::create, std::move(options)).then([this, testfile] (file file) {
                _file = file;
                if (this_shard_id() == 0) {
                    iotune_logger.info("Filesystem parameters: read alignment {}, write alignment {}", _file.disk_read_dma_alignment(), _file.disk_write_dma_alignment());
                }
                return remove_file(testfile.string()).then([this] {
                    return remove_file(_dirpath.string());
                });
            }).then([this] {
                return _file.truncate(_file_size);
            });
        });
    }

    future<io_rates> do_workload(std::unique_ptr<io_worker> worker_ptr, unsigned max_os_concurrency, bool update_file_size = false) {
        if (update_file_size) {
            _file_size = 0;
        }

        auto worker = worker_ptr.get();
        auto concurrency = std::views::iota(0u, max_os_concurrency);
        return parallel_for_each(std::move(concurrency), [worker] (unsigned idx) {
            auto bufptr = worker->get_buffer();
            auto buf = bufptr.get();
            return do_until([worker] { return worker->should_stop(); }, [buf, worker] {
                return worker->issue_request(buf);
            }).finally([alive = std::move(bufptr)] {});
        }).then_wrapped([this, worker = std::move(worker_ptr), update_file_size] (future<> f) {
            try {
                f.get();
            } catch (invalid_position& ip) {
                // expected if sequential. Example: reading and the file ended.
                if (!worker->is_sequential()) {
                    throw;
                }
            }

            if (update_file_size) {
                _file_size = worker->max_offset();
            }
            return make_ready_future<io_rates>(worker->get_io_rates());
        });
    }

    future<io_rates> read_workload(size_t buffer_size, pattern access_pattern, unsigned max_os_concurrency, std::chrono::duration<double> duration, std::vector<unsigned>& rates, bool _ = true) {
        buffer_size = calculate_buffer_size(access_pattern, buffer_size, _file.disk_read_dma_alignment(), access_type::read);
        auto worker = std::make_unique<io_worker>(buffer_size, duration, std::make_unique<read_request_issuer>(_file), get_position_generator(buffer_size, access_pattern), rates);
        return do_workload(std::move(worker), max_os_concurrency);
    }

    future<io_rates> write_workload(size_t buffer_size, pattern access_pattern, unsigned max_os_concurrency, std::chrono::duration<double> duration, std::vector<unsigned>& rates, bool with_warmup = true) {
        buffer_size = calculate_buffer_size(access_pattern, buffer_size, _file.disk_write_dma_alignment(), access_type::write);
        auto worker = std::make_unique<io_worker>(buffer_size, duration, std::make_unique<write_request_issuer>(_file), get_position_generator(buffer_size, access_pattern), rates, with_warmup);
        bool update_file_size = worker->is_sequential();
        return do_workload(std::move(worker), max_os_concurrency, update_file_size).then([this] (io_rates r) {
            return _file.flush().then([r = std::move(r)] () mutable {
                return make_ready_future<io_rates>(std::move(r));
            });
        });
    }

    future<> stop() {
        return _file ? _file.close() : make_ready_future<>();
    }
};

class iotune_multi_shard_context {
    ::evaluation_directory _test_directory;
    uint64_t _random_write_io_buffer_size;
    uint64_t _random_read_io_buffer_size;

    unsigned per_shard_io_depth() const {
        auto iodepth = _test_directory.max_iodepth() / smp::count;
        if (this_shard_id() < _test_directory.max_iodepth() % smp::count) {
            iodepth++;
        }
        return std::min(iodepth, 128u);
    }
    seastar::sharded<test_file> _iotune_test_file;

    std::vector<unsigned> serial_rates;
    seastar::sharded<std::vector<unsigned>> sharded_rates;

public:
    future<> stop() {
        return _iotune_test_file.stop().then([this] { return sharded_rates.stop(); });
    }

    future<> start() {
       const auto maximum_size = (_test_directory.available_space() / (2 * smp::count));
       return _iotune_test_file.start(_test_directory, maximum_size, _random_write_io_buffer_size, _random_read_io_buffer_size).then([this] {
           return sharded_rates.start();
       });
    }

    future<row_stats> get_serial_rates() {
        row_stats ret = get_row_stats_for<unsigned>(serial_rates);
        serial_rates.clear();
        return make_ready_future<row_stats>(ret);
    }

    future<row_stats> get_sharded_worst_rates() {
        return sharded_rates.map_reduce0([] (std::vector<unsigned>& rates) {
            row_stats ret = get_row_stats_for<unsigned>(rates);
            rates.clear();
            return ret;
        }, row_stats{0, 0.0, 0.0},
        [] (const row_stats& res, row_stats lres) {
            return res.stdev < lres.stdev ? lres : res;
        });
    }

    future<> create_data_file() {
        return _iotune_test_file.invoke_on_all([] (test_file& tf) {
            return tf.create_data_file();
        });
    }

    future<io_rates> write_sequential_data(unsigned shard, size_t buffer_size, std::chrono::duration<double> duration) {
        return _iotune_test_file.invoke_on(shard, [this, buffer_size, duration] (test_file& tf) {
            return tf.write_workload(buffer_size, test_file::pattern::sequential, 4 * _test_directory.disks_per_array(), duration, serial_rates, false);
        });
    }

    future<> warm_up_sequential_data(size_t buffer_size, std::chrono::duration<double> duration) {
        return _iotune_test_file.invoke_on_all([this, buffer_size, duration] (test_file& tf) {
            return tf.write_workload(buffer_size, test_file::pattern::sequential, 4 * _test_directory.disks_per_array(), duration, sharded_rates.local(), false).then([this] (io_rates r) {
                sharded_rates.local().clear();
                return make_ready_future<>();
            });
        });
    }

    future<io_rates> read_sequential_data(unsigned shard, size_t buffer_size, std::chrono::duration<double> duration) {
        return _iotune_test_file.invoke_on(shard, [this, buffer_size, duration] (test_file& tf) {
            return tf.read_workload(buffer_size, test_file::pattern::sequential, 4 * _test_directory.disks_per_array(), duration, serial_rates);
        });
    }

    future<io_rates> write_random_data(size_t buffer_size, std::chrono::duration<double> duration) {
        return _iotune_test_file.map_reduce0([buffer_size, this, duration] (test_file& tf) {
            const auto shard_io_depth = per_shard_io_depth();
            if (shard_io_depth == 0) {
                return make_ready_future<io_rates>();
            } else {
                return tf.write_workload(buffer_size, test_file::pattern::random, shard_io_depth, duration, sharded_rates.local());
            }
        }, io_rates(), std::plus<io_rates>());
    }

    future<io_rates> read_random_data(size_t buffer_size, std::chrono::duration<double> duration) {
        return _iotune_test_file.map_reduce0([buffer_size, this, duration] (test_file& tf) {
            const auto shard_io_depth = per_shard_io_depth();
            if (shard_io_depth == 0) {
                return make_ready_future<io_rates>();
            } else {
                return tf.read_workload(buffer_size, test_file::pattern::random, shard_io_depth, duration, sharded_rates.local());
            }
        }, io_rates(), std::plus<io_rates>());
    }

private:
    template <typename Fn>
    future<uint64_t> saturate(float rate_threshold, size_t buffer_size, std::chrono::duration<double> duration, Fn&& workload) {
        return _iotune_test_file.invoke_on(0, [this, rate_threshold, buffer_size, duration, workload] (test_file& tf) {
            return (tf.*workload)(buffer_size, test_file::pattern::sequential, 1, duration, serial_rates, true).then([this, rate_threshold, buffer_size, duration, workload] (io_rates rates) {
                serial_rates.clear();
                if (rates.bytes_per_sec < rate_threshold) {
                    // The throughput with the given buffer-size is already "small enough", so
                    // return back its previous value
                    return make_ready_future<uint64_t>(buffer_size * 2);
                } else {
                    return saturate(rate_threshold, buffer_size / 2, duration, workload);
                }
            });
        });
    }

public:
    future<uint64_t> saturate_write(float rate_threshold, size_t buffer_size, std::chrono::duration<double> duration) {
        return saturate(rate_threshold, buffer_size, duration, &test_file::write_workload);
    }

    future<uint64_t> saturate_read(float rate_threshold, size_t buffer_size, std::chrono::duration<double> duration) {
        return saturate(rate_threshold, buffer_size, duration, &test_file::read_workload);
    }

    // Detect physical block size by testing write performance at different alignments.
    // Returns the smallest alignment where write performance is good (no RMW penalty).
    // Tests alignments from 512 bytes up to 8192 bytes.
    //
    // The detection works by measuring write IOPS at each alignment. If writes smaller
    // than the physical block size are issued, the disk must perform read-modify-write
    // (RMW) operations, which reduces IOPS. Once we reach the physical block size,
    // IOPS should plateau as larger alignments don't provide additional benefit.
    future<uint64_t> detect_physical_block_size(std::chrono::duration<double> duration, std::optional<uint64_t> reported_pbs = std::nullopt) {
        // Test alignments: 512, 1024, 2048, 4096, 8192
        // This covers most common physical block sizes
        std::vector<uint64_t> test_alignments = {512, 1024, 2048, 4096, 8192};
        std::map<uint64_t, float> alignment_to_iops;

        iotune_logger.info("Detecting physical block size by testing write performance at different alignments");

        for (auto alignment : test_alignments) {
            // Perform a short write test at this alignment (5% of total test duration)
            auto rates = co_await write_random_data(alignment, duration * 0.05);
            alignment_to_iops[alignment] = rates.iops;

            iotune_logger.info("Alignment {} bytes: {} IOPS", alignment, uint64_t(rates.iops));

            // Clear rates after each test
            co_await sharded_rates.invoke_on_all([] (std::vector<unsigned>& rates) {
                rates.clear();
                return make_ready_future<>();
            });
        }

        // Find the smallest alignment where performance plateaus.
        // We look for the point where increasing alignment doesn't significantly improve IOPS.
        // This indicates we've reached or exceeded the physical block size.
        //
        // Algorithm: Find the first alignment where the next larger alignment doesn't
        // improve IOPS by more than 5%. This is the physical block size.
        uint64_t detected_size = test_alignments.back(); // Default to largest if no plateau found
        float max_iops = 0;

        for (size_t i = 0; i < test_alignments.size() - 1; ++i) {
            auto current_alignment = test_alignments[i];
            auto next_alignment = test_alignments[i + 1];
            auto current_iops = alignment_to_iops[current_alignment];
            auto next_iops = alignment_to_iops[next_alignment];

            max_iops = std::max(max_iops, current_iops);

            // If the next larger alignment doesn't improve IOPS by more than 5%,
            // we've found the physical block size
            if (next_iops <= current_iops * 1.05) {
                detected_size = current_alignment;
                iotune_logger.info("Performance plateau detected at {} bytes", detected_size);
                break;
            }
        }

        // If we didn't find a plateau, use the alignment with the best IOPS
        if (detected_size == test_alignments.back()) {
            for (const auto& [alignment, iops] : alignment_to_iops) {
                if (iops >= max_iops * 0.95) {  // Within 5% of max
                    detected_size = std::min(detected_size, alignment);
                }
            }
            iotune_logger.info("No clear plateau, using alignment with best performance: {} bytes", detected_size);
        }

        iotune_logger.info("Detected physical block size: {} bytes", detected_size);

        // Compare with driver-reported value if available
        if (reported_pbs) {
            if (detected_size == *reported_pbs) {
                iotune_logger.info("Detected value matches driver-reported value ({} bytes)", *reported_pbs);
            } else {
                iotune_logger.warn("Detected value differs from driver-reported value ({} bytes)", *reported_pbs);
                iotune_logger.warn("The disk may be lying about its physical block size");
                iotune_logger.warn("Using empirically detected value {} bytes to avoid write amplification", detected_size);
            }
        }

        co_return detected_size;
    }

    iotune_multi_shard_context(::evaluation_directory dir, uint64_t random_write_io_buffer_size, uint64_t random_read_io_buffer_size)
        : _test_directory(dir)
        , _random_write_io_buffer_size(random_write_io_buffer_size)
        , _random_read_io_buffer_size(random_read_io_buffer_size)
    {}
};

struct disk_descriptor {
    std::string mountpoint;
    uint64_t read_iops;
    uint64_t read_bw;
    uint64_t write_iops;
    uint64_t write_bw;
    std::optional<uint64_t> read_sat_len;
    std::optional<uint64_t> write_sat_len;
    std::optional<uint64_t> physical_block_size;
};

void string_to_file(sstring conf_file, sstring buf) {
    auto f = file_desc::open(conf_file, O_WRONLY | O_CLOEXEC | O_CREAT | O_TRUNC, 0664);
    auto ret = f.write(buf.data(), buf.size());
    if (!ret || (*ret != buf.size())) {
        throw std::runtime_error(fmt::format("Can't write {}: {}", conf_file, *ret));
    }
}

void write_configuration_file(sstring conf_file, std::string format, sstring properties_file) {
    sstring buf;
    if (format == "seastar") {
        buf = fmt::format("io-properties-file={}\n", properties_file);
    } else {
        buf = fmt::format("SEASTAR_IO=\"--io-properties-file={}\"\n", properties_file);
    }
    string_to_file(conf_file, buf);
}

void write_property_file(sstring conf_file, std::vector<disk_descriptor> disk_descriptors) {
    YAML::Emitter out;
    out << YAML::BeginMap;
    out << YAML::Key << "disks";
    out << YAML::BeginSeq;
    for (auto& desc : disk_descriptors) {
        out << YAML::BeginMap;
        out << YAML::Key << "mountpoint" << YAML::Value << desc.mountpoint;
        out << YAML::Key << "read_iops" << YAML::Value << desc.read_iops;
        out << YAML::Key << "read_bandwidth" << YAML::Value << desc.read_bw;
        out << YAML::Key << "write_iops" << YAML::Value << desc.write_iops;
        out << YAML::Key << "write_bandwidth" << YAML::Value << desc.write_bw;
        if (desc.read_sat_len) {
            out << YAML::Key << "read_saturation_length" << YAML::Value << *desc.read_sat_len;
        }
        if (desc.write_sat_len) {
            out << YAML::Key << "write_saturation_length" << YAML::Value << *desc.write_sat_len;
        }
        if (desc.physical_block_size) {
            out << YAML::Key << "physical_block_size" << YAML::Value << *desc.physical_block_size;
        }
        out << YAML::EndMap;
    }
    out << YAML::EndSeq;
    out << YAML::EndMap;
    out << YAML::Newline;

    string_to_file(conf_file, sstring(out.c_str(), out.size()));
}

// Returns the mountpoint of a path. It works by walking backwards from the canonical path
// (absolute, with symlinks resolved), until we find a point that crosses a device ID.
fs::path mountpoint_of(sstring filename) {
    fs::path mnt_candidate = fs::canonical(fs::path(filename));
    std::optional<dev_t> candidate_id = {};
    auto current = mnt_candidate;
    do {
        auto f = open_directory(current.string()).get();
        auto st = f.stat().get();
        if ((candidate_id) && (*candidate_id != st.st_dev)) {
            return mnt_candidate;
        }
        mnt_candidate = current;
        candidate_id = st.st_dev;
        current = current.parent_path();
    } while (mnt_candidate != current);

    return mnt_candidate;
}

int main(int ac, char** av) {
    namespace bpo = boost::program_options;
    bool fs_check = false;

    app_template::config app_cfg;
    app_cfg.name = "IOTune";

    app_template app(std::move(app_cfg));
    auto opt_add = app.add_options();
    opt_add
        ("evaluation-directory", bpo::value<std::vector<sstring>>()->required(), "directory where to execute the evaluation")
        ("properties-file", bpo::value<sstring>(), "path in which to write the YAML file")
        ("options-file", bpo::value<sstring>(), "path in which to write the legacy conf file")
        ("duration", bpo::value<unsigned>()->default_value(120), "time, in seconds, for which to run the test")
        ("format", bpo::value<sstring>()->default_value("seastar"), "Configuration file format (seastar | envfile)")
        ("fs-check", bpo::bool_switch(&fs_check), "perform FS check only")
        ("detect-physical-block-size", bpo::bool_switch(), "detect physical block size (off by default; can be slow)")
        ("accuracy", bpo::value<unsigned>()->default_value(3), "acceptable deviation of measurements (percents)")
        ("saturation", bpo::value<sstring>()->default_value(""), "measure saturation lengths (read | write | both) (this is very slow!)")
        ("random-write-io-buffer-size", bpo::value<unsigned>()->default_value(0), "force buffer size for random write")
        ("random-read-io-buffer-size", bpo::value<unsigned>()->default_value(0), "force buffer size for random read")
        ("force-io-depth", bpo::value<unsigned>()->default_value(0), "force io depth to a certain size (overriding auto detection logic)")
        ("get-best-iops-with-buffer-sizes", bpo::value<std::vector<uint64_t>>()->default_value(std::vector<uint64_t>{}, ""), "run IOPS tests with buffer sizes passed as arg and choose the best combination")
        ("sequential_read_buffer_size", bpo::value<uint64_t>()->default_value(1 << 20), "Set the sequential buffer size used for read bandwidth calculation. Default is 1MiB")
        ("sequential_write_buffer_size", bpo::value<uint64_t>()->default_value(1 << 20), "Set the sequential buffer size used for write bandwidth calculation. Default is 1MiB")
    ;

    return app.run(ac, av, [&] {
        return seastar::async([&] {
            auto& configuration = app.configuration();
            auto eval_dirs = configuration["evaluation-directory"].as<std::vector<sstring>>();
            auto format = configuration["format"].as<sstring>();
            auto duration = std::chrono::duration<double>(configuration["duration"].as<unsigned>() * 1s);
            auto accuracy = configuration["accuracy"].as<unsigned>();
            auto saturation = configuration["saturation"].as<sstring>();
            auto random_write_io_buffer_size = configuration["random-write-io-buffer-size"].as<unsigned>();
            auto random_read_io_buffer_size = configuration["random-read-io-buffer-size"].as<unsigned>();
            auto force_io_depth = configuration["force-io-depth"].as<unsigned>();
            auto buffer_sizes_for_best_iops = configuration["get-best-iops-with-buffer-sizes"].as<std::vector<uint64_t>>();
            auto detect_pbs = configuration["detect-physical-block-size"].as<bool>();
            if (!buffer_sizes_for_best_iops.empty() && (random_read_io_buffer_size || random_write_io_buffer_size)) {
                iotune_logger.error("--get-best-iops-with-buffer-sizes is set, but random-read-io-buffer-size or random-write-io-buffer-size are also set. "
                                    "The options are mutually exclusive, please unset one of them.");
                return 1;
            }
            auto sequential_read_buffer_size = configuration["sequential_read_buffer_size"].as<uint64_t>();
            auto sequential_write_buffer_size = configuration["sequential_write_buffer_size"].as<uint64_t>();

            bool read_saturation, write_saturation;
            if (saturation == "") {
                read_saturation = false;
                write_saturation = false;
            } else if (saturation == "both") {
                read_saturation = true;
                write_saturation = true;
            } else if (saturation == "read") {
                read_saturation = true;
                write_saturation = false;
            } else if (saturation == "write") {
                read_saturation = false;
                write_saturation = true;
            } else {
                fmt::print("Bad --saturation value\n");
                return 1;
            }

            std::vector<disk_descriptor> disk_descriptors;
            std::unordered_map<sstring, sstring> mountpoint_map;
            // We want to evaluate once per mountpoint, but we still want to write in one of the
            // directories that we were provided - we may not have permissions to write into the
            // mountpoint itself. If we are passed more than one directory per mountpoint, we don't
            // really care to which one we write, so this simple hash will do.
            for (auto& eval_dir : eval_dirs) {
                mountpoint_map[mountpoint_of(eval_dir).string()] = eval_dir;
            }
            for (auto eval: mountpoint_map) {
                auto mountpoint = eval.first;
                auto eval_dir = eval.second;

                if (!filesystem_has_good_aio_support(eval_dir, false)) {
                    iotune_logger.error("Linux AIO is not supported by filesystem at {}", eval_dir);
                    return 1;
                }

                auto rec = 10000000000ULL;
                auto avail = fs_avail(eval_dir).get();
                if (avail < rec) {
                    uint64_t val;
                    const char* units;
                    if (avail >= 1000000000) {
                        val = (avail + 500000000) / 1000000000;
                        units = "GB";
                    } else if (avail >= 1000000) {
                        val = (avail + 500000) / 1000000;
                        units = "MB";
                    } else {
                        val = avail;
                        units = "bytes";
                    }
       
Download .txt
gitextract_vjp23guz/

├── .clangd
├── .claude/
│   └── CLAUDE.md
├── .dockerignore
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── alpinelinux.yaml
│       ├── docker.yaml
│       ├── pre-commit.yaml
│       ├── python-lint.yaml
│       ├── test.yaml
│       └── tests.yaml
├── .gitignore
├── .gitmodules
├── .gitorderfile
├── .mailmap
├── .pre-commit-config.yaml
├── CMakeLists.txt
├── CONTRIBUTING.md
├── HACKING.md
├── LICENSE
├── NOTICE
├── README-DPDK.md
├── README.md
├── apps/
│   ├── CMakeLists.txt
│   ├── httpd/
│   │   ├── CMakeLists.txt
│   │   ├── demo.json
│   │   └── main.cc
│   ├── io_tester/
│   │   ├── CMakeLists.txt
│   │   ├── conf.yaml
│   │   ├── io_tester.cc
│   │   ├── ioinfo.cc
│   │   └── sched.yaml
│   ├── iotune/
│   │   ├── CMakeLists.txt
│   │   └── iotune.cc
│   ├── lib/
│   │   └── stop_signal.hh
│   ├── memcached/
│   │   ├── CMakeLists.txt
│   │   ├── ascii.rl
│   │   ├── memcache.cc
│   │   ├── memcached.hh
│   │   └── tests/
│   │       ├── CMakeLists.txt
│   │       ├── test.py
│   │       ├── test_ascii_parser.cc
│   │       └── test_memcached.py
│   ├── rpc_tester/
│   │   ├── CMakeLists.txt
│   │   ├── rpc_tester.cc
│   │   └── sample-conf.yaml
│   └── seawreck/
│       ├── CMakeLists.txt
│       └── seawreck.cc
├── cmake/
│   ├── CheckGcc107852.cmake
│   ├── CheckHeaders.cmake
│   ├── CheckIncludeStyle.cmake
│   ├── CheckLibc.cmake
│   ├── CheckP2582R1.cmake
│   ├── CxxModulesRules.cmake
│   ├── FindGnuTLS.cmake
│   ├── FindLibUring.cmake
│   ├── FindLinuxMembarrier.cmake
│   ├── FindPthreadSetName.cmake
│   ├── FindSanitizers.cmake
│   ├── FindStdAtomic.cmake
│   ├── FindSystemTap-SDT.cmake
│   ├── FindValgrind.cmake
│   ├── Findc-ares.cmake
│   ├── Finddpdk.cmake
│   ├── Findhwloc.cmake
│   ├── Findlksctp-tools.cmake
│   ├── Findlz4.cmake
│   ├── Findragel.cmake
│   ├── Findrt.cmake
│   ├── Finducontext.cmake
│   ├── Findyaml-cpp.cmake
│   ├── SeastarConfig.cmake.in
│   ├── SeastarDependencies.cmake
│   ├── TriStateOption.cmake
│   ├── check-seastar-include-style.py
│   └── code_tests/
│       ├── LinuxMembarrier_test.cc
│       ├── Sanitizers_fiber_test.cc
│       ├── Source_location_default_argument.cc
│       ├── Source_location_test.cc
│       ├── rt_test.cc
│       └── stdout_test.cc
├── coding-style.md
├── configure.py
├── cooking.sh
├── cooking_recipe.cmake
├── debug/
│   └── task-latency.stap
├── demos/
│   ├── CMakeLists.txt
│   ├── block_discard_demo.cc
│   ├── coroutines_demo.cc
│   ├── echo_demo.cc
│   ├── file_demo.cc
│   ├── hello-cxx-module.cc
│   ├── hello-world.cc
│   ├── http_client_demo.cc
│   ├── ip_demo.cc
│   ├── l3_demo.cc
│   ├── line_count_demo.cc
│   ├── rpc_demo.cc
│   ├── scheduling_group_demo.cc
│   ├── sharded_parameter_demo.cc
│   ├── tcp_demo.cc
│   ├── tcp_sctp_client_demo.cc
│   ├── tcp_sctp_server_demo.cc
│   ├── tls_echo_server.hh
│   ├── tls_echo_server_demo.cc
│   ├── tls_simple_client_demo.cc
│   ├── tutorial_examples.cc
│   ├── udp_client_demo.cc
│   ├── udp_server_demo.cc
│   ├── udp_zero_copy_demo.cc
│   ├── websocket_client_demo.cc
│   └── websocket_server_demo.cc
├── doc/
│   ├── CMakeLists.txt
│   ├── Doxyfile.in
│   ├── DoxygenLayout.xml
│   ├── compatibility.md
│   ├── contributing.md
│   ├── generator.md
│   ├── htmlsplit.py
│   ├── io-properties-file.md
│   ├── io-scheduler.md
│   ├── io-tester.md
│   ├── lambda-coroutine-fiasco.md
│   ├── md2html
│   ├── md2pdf
│   ├── mini-tutorial.md
│   ├── native-stack.md
│   ├── network-configuration.md
│   ├── network-connection-load-balancing.md
│   ├── prometheus.md
│   ├── rpc-compression.md
│   ├── rpc-streaming.md
│   ├── rpc.md
│   ├── shared-token-bucket.md
│   ├── signal.md
│   ├── template.css
│   ├── template.tex
│   ├── testing.md
│   ├── tutorial.md
│   └── websocket.md
├── docker/
│   └── dev/
│       └── Dockerfile
├── include/
│   └── seastar/
│       ├── core/
│       │   ├── abort_on_ebadf.hh
│       │   ├── abort_on_expiry.hh
│       │   ├── abort_source.hh
│       │   ├── abortable_fifo.hh
│       │   ├── alien.hh
│       │   ├── align.hh
│       │   ├── aligned_buffer.hh
│       │   ├── app-template.hh
│       │   ├── bitops.hh
│       │   ├── bitset-iter.hh
│       │   ├── byteorder.hh
│       │   ├── cacheline.hh
│       │   ├── checked_ptr.hh
│       │   ├── chunked_fifo.hh
│       │   ├── circular_buffer.hh
│       │   ├── circular_buffer_fixed_capacity.hh
│       │   ├── condition-variable.hh
│       │   ├── coroutine.hh
│       │   ├── deleter.hh
│       │   ├── disk_params.hh
│       │   ├── distributed.hh
│       │   ├── do_with.hh
│       │   ├── dpdk_rte.hh
│       │   ├── enum.hh
│       │   ├── exception_hacks.hh
│       │   ├── execution_stage.hh
│       │   ├── expiring_fifo.hh
│       │   ├── fair_queue.hh
│       │   ├── file-types.hh
│       │   ├── file.hh
│       │   ├── format.hh
│       │   ├── fsnotify.hh
│       │   ├── fsqual.hh
│       │   ├── fstream.hh
│       │   ├── function_traits.hh
│       │   ├── future-util.hh
│       │   ├── future.hh
│       │   ├── gate.hh
│       │   ├── idle_cpu_handler.hh
│       │   ├── internal/
│       │   │   ├── api-level.hh
│       │   │   ├── buffer_allocator.hh
│       │   │   ├── current_task.hh
│       │   │   ├── estimated_histogram.hh
│       │   │   ├── io_desc.hh
│       │   │   ├── io_intent.hh
│       │   │   ├── io_request.hh
│       │   │   ├── io_sink.hh
│       │   │   ├── linux-aio.hh
│       │   │   ├── poll.hh
│       │   │   ├── pollable_fd.hh
│       │   │   ├── run_in_background.hh
│       │   │   ├── stall_detector.hh
│       │   │   ├── systemwide_memory_barrier.hh
│       │   │   └── uname.hh
│       │   ├── io_intent.hh
│       │   ├── io_priority_class.hh
│       │   ├── io_queue.hh
│       │   ├── iostream-impl.hh
│       │   ├── iostream.hh
│       │   ├── layered_file.hh
│       │   ├── loop.hh
│       │   ├── lowres_clock.hh
│       │   ├── make_task.hh
│       │   ├── manual_clock.hh
│       │   ├── map_reduce.hh
│       │   ├── memory.hh
│       │   ├── metrics.hh
│       │   ├── metrics_api.hh
│       │   ├── metrics_registration.hh
│       │   ├── metrics_types.hh
│       │   ├── on_internal_error.hh
│       │   ├── pipe.hh
│       │   ├── polymorphic_temporary_buffer.hh
│       │   ├── posix.hh
│       │   ├── preempt.hh
│       │   ├── prefetch.hh
│       │   ├── print.hh
│       │   ├── prometheus.hh
│       │   ├── queue.hh
│       │   ├── ragel.hh
│       │   ├── reactor.hh
│       │   ├── reactor_config.hh
│       │   ├── relabel_config.hh
│       │   ├── report_exception.hh
│       │   ├── resource.hh
│       │   ├── rwlock.hh
│       │   ├── scattered_message.hh
│       │   ├── scheduling.hh
│       │   ├── scheduling_specific.hh
│       │   ├── scollectd.hh
│       │   ├── scollectd_api.hh
│       │   ├── seastar.hh
│       │   ├── semaphore.hh
│       │   ├── shard_id.hh
│       │   ├── sharded.hh
│       │   ├── shared_future.hh
│       │   ├── shared_mutex.hh
│       │   ├── shared_ptr.hh
│       │   ├── shared_ptr_debug_helper.hh
│       │   ├── shared_ptr_incomplete.hh
│       │   ├── signal.hh
│       │   ├── simple-stream.hh
│       │   ├── slab.hh
│       │   ├── sleep.hh
│       │   ├── smp.hh
│       │   ├── smp_options.hh
│       │   ├── sstring.hh
│       │   ├── stall_sampler.hh
│       │   ├── stream.hh
│       │   ├── task.hh
│       │   ├── temporary_buffer.hh
│       │   ├── thread.hh
│       │   ├── thread_cputime_clock.hh
│       │   ├── thread_impl.hh
│       │   ├── timed_out_error.hh
│       │   ├── timer-set.hh
│       │   ├── timer.hh
│       │   ├── transfer.hh
│       │   ├── unaligned.hh
│       │   ├── units.hh
│       │   ├── vector-data-sink.hh
│       │   ├── weak_ptr.hh
│       │   ├── when_all.hh
│       │   ├── when_any.hh
│       │   ├── with_scheduling_group.hh
│       │   └── with_timeout.hh
│       ├── coroutine/
│       │   ├── all.hh
│       │   ├── as_future.hh
│       │   ├── exception.hh
│       │   ├── generator.hh
│       │   ├── maybe_yield.hh
│       │   ├── parallel_for_each.hh
│       │   ├── switch_to.hh
│       │   └── try_future.hh
│       ├── http/
│       │   ├── api_docs.hh
│       │   ├── client.hh
│       │   ├── common.hh
│       │   ├── connection_factory.hh
│       │   ├── exception.hh
│       │   ├── file_handler.hh
│       │   ├── function_handlers.hh
│       │   ├── handlers.hh
│       │   ├── httpd.hh
│       │   ├── internal/
│       │   │   └── content_source.hh
│       │   ├── json_path.hh
│       │   ├── matcher.hh
│       │   ├── matchrules.hh
│       │   ├── mime_types.hh
│       │   ├── reply.hh
│       │   ├── request.hh
│       │   ├── retry_strategy.hh
│       │   ├── routes.hh
│       │   ├── short_streams.hh
│       │   ├── transformers.hh
│       │   ├── types.hh
│       │   └── url.hh
│       ├── json/
│       │   ├── formatter.hh
│       │   └── json_elements.hh
│       ├── net/
│       │   ├── api.hh
│       │   ├── arp.hh
│       │   ├── byteorder.hh
│       │   ├── config.hh
│       │   ├── const.hh
│       │   ├── dhcp.hh
│       │   ├── dns.hh
│       │   ├── dpdk.hh
│       │   ├── ethernet.hh
│       │   ├── inet_address.hh
│       │   ├── ip.hh
│       │   ├── ip_checksum.hh
│       │   ├── ipv4_address.hh
│       │   ├── ipv6_address.hh
│       │   ├── native-stack.hh
│       │   ├── net.hh
│       │   ├── packet-data-source.hh
│       │   ├── packet-util.hh
│       │   ├── packet.hh
│       │   ├── posix-stack.hh
│       │   ├── proxy.hh
│       │   ├── socket_defs.hh
│       │   ├── stack.hh
│       │   ├── tcp-stack.hh
│       │   ├── tcp.hh
│       │   ├── tls.hh
│       │   ├── toeplitz.hh
│       │   ├── udp.hh
│       │   ├── unix_address.hh
│       │   ├── virtio-interface.hh
│       │   └── virtio.hh
│       ├── rpc/
│       │   ├── lz4_compressor.hh
│       │   ├── lz4_fragmented_compressor.hh
│       │   ├── multi_algo_compressor_factory.hh
│       │   ├── rpc.hh
│       │   ├── rpc_impl.hh
│       │   └── rpc_types.hh
│       ├── testing/
│       │   ├── entry_point.hh
│       │   ├── exchanger.hh
│       │   ├── linux_perf_event.hh
│       │   ├── on_internal_error.hh
│       │   ├── perf_tests.hh
│       │   ├── random.hh
│       │   ├── seastar_test.hh
│       │   ├── test_case.hh
│       │   ├── test_fixture.hh
│       │   ├── test_runner.hh
│       │   └── thread_test_case.hh
│       ├── util/
│       │   ├── alloc_failure_injector.hh
│       │   ├── assert.hh
│       │   ├── backtrace.hh
│       │   ├── bool_class.hh
│       │   ├── closeable.hh
│       │   ├── conversions.hh
│       │   ├── critical_alloc_section.hh
│       │   ├── defer.hh
│       │   ├── eclipse.hh
│       │   ├── exceptions.hh
│       │   ├── file.hh
│       │   ├── function_input_iterator.hh
│       │   ├── indirect.hh
│       │   ├── integrated-length.hh
│       │   ├── internal/
│       │   │   ├── array_map.hh
│       │   │   ├── iovec_utils.hh
│       │   │   └── magic.hh
│       │   ├── iostream.hh
│       │   ├── is_smart_ptr.hh
│       │   ├── later.hh
│       │   ├── lazy.hh
│       │   ├── log-cli.hh
│       │   ├── log-impl.hh
│       │   ├── log-level.hh
│       │   ├── log.hh
│       │   ├── memory-data-sink.hh
│       │   ├── memory-data-source.hh
│       │   ├── memory_diagnostics.hh
│       │   ├── noncopyable_function.hh
│       │   ├── optimized_optional.hh
│       │   ├── print_safe.hh
│       │   ├── process.hh
│       │   ├── program-options.hh
│       │   ├── read_first_line.hh
│       │   ├── reference_wrapper.hh
│       │   ├── sampler.hh
│       │   ├── shared_token_bucket.hh
│       │   ├── short_streams.hh
│       │   ├── spinlock.hh
│       │   ├── std-compat.hh
│       │   ├── string_utils.hh
│       │   ├── tmp_file.hh
│       │   ├── transform_iterator.hh
│       │   ├── tuple_utils.hh
│       │   ├── used_size.hh
│       │   └── variant_utils.hh
│       └── websocket/
│           ├── client.hh
│           ├── common.hh
│           ├── parser.hh
│           └── server.hh
├── install-dependencies.sh
├── kvm/
│   ├── README.md
│   ├── register.sh
│   └── scripts/
│       └── bootstrap.sh
├── licenses/
│   ├── cmake.txt
│   ├── dpdk.txt
│   └── freebsd.txt
├── pkgconfig/
│   ├── seastar-testing.pc.in
│   └── seastar.pc.in
├── scripts/
│   ├── addr2line.py
│   ├── dpdk_nic_bind.py
│   ├── io-trace-parse.py
│   ├── perftune.py
│   ├── perftune.yaml
│   ├── posix_net_conf.sh
│   ├── pyproject.toml
│   ├── run_with_dpdk.sh
│   ├── seastar-addr2line
│   ├── seastar-cpu-map.sh
│   ├── seastar-json2code.py
│   ├── stall-analyser.py
│   └── tap.sh
├── seastar_cmake.py
├── src/
│   ├── core/
│   │   ├── alien.cc
│   │   ├── app-template.cc
│   │   ├── cgroup.hh
│   │   ├── condition-variable.cc
│   │   ├── disk_params.cc
│   │   ├── dpdk_rte.cc
│   │   ├── exception_hacks.cc
│   │   ├── execution_stage.cc
│   │   ├── fair_queue.cc
│   │   ├── file-impl.hh
│   │   ├── file.cc
│   │   ├── fsnotify.cc
│   │   ├── fsqual.cc
│   │   ├── fstream.cc
│   │   ├── future-util.cc
│   │   ├── future.cc
│   │   ├── io_queue.cc
│   │   ├── linux-aio.cc
│   │   ├── memory.cc
│   │   ├── metrics.cc
│   │   ├── on_internal_error.cc
│   │   ├── posix.cc
│   │   ├── prefault.hh
│   │   ├── program_options.cc
│   │   ├── program_options.hh
│   │   ├── prometheus-impl.hh
│   │   ├── prometheus.cc
│   │   ├── reactor.cc
│   │   ├── reactor_backend.cc
│   │   ├── reactor_backend.hh
│   │   ├── resource.cc
│   │   ├── scollectd-impl.hh
│   │   ├── scollectd.cc
│   │   ├── semaphore.cc
│   │   ├── sharded.cc
│   │   ├── signal.cc
│   │   ├── smp.cc
│   │   ├── sstring.cc
│   │   ├── syscall_result.hh
│   │   ├── syscall_work_queue.hh
│   │   ├── systemwide_memory_barrier.cc
│   │   ├── thread.cc
│   │   ├── thread_pool.cc
│   │   ├── thread_pool.hh
│   │   ├── uname.cc
│   │   └── vla.hh
│   ├── http/
│   │   ├── api_docs.cc
│   │   ├── chunk_parsers.rl
│   │   ├── client.cc
│   │   ├── common.cc
│   │   ├── file_handler.cc
│   │   ├── httpd.cc
│   │   ├── json_path.cc
│   │   ├── matcher.cc
│   │   ├── mime_types.cc
│   │   ├── reply.cc
│   │   ├── request.cc
│   │   ├── request_parser.rl
│   │   ├── response_parser.rl
│   │   ├── retry_strategy.cc
│   │   ├── routes.cc
│   │   ├── transformers.cc
│   │   └── url.cc
│   ├── json/
│   │   ├── formatter.cc
│   │   └── json_elements.cc
│   ├── net/
│   │   ├── arp.cc
│   │   ├── config.cc
│   │   ├── dhcp.cc
│   │   ├── dns.cc
│   │   ├── dpdk.cc
│   │   ├── ethernet.cc
│   │   ├── inet_address.cc
│   │   ├── ip.cc
│   │   ├── ip_checksum.cc
│   │   ├── native-stack-impl.hh
│   │   ├── native-stack.cc
│   │   ├── net.cc
│   │   ├── packet.cc
│   │   ├── posix-stack.cc
│   │   ├── proxy.cc
│   │   ├── socket_address.cc
│   │   ├── stack.cc
│   │   ├── tcp.cc
│   │   ├── tls.cc
│   │   ├── udp.cc
│   │   ├── unix_address.cc
│   │   └── virtio.cc
│   ├── proto/
│   │   └── metrics2.proto
│   ├── rpc/
│   │   ├── lz4_compressor.cc
│   │   ├── lz4_fragmented_compressor.cc
│   │   └── rpc.cc
│   ├── seastar.cppm
│   ├── testing/
│   │   ├── entry_point.cc
│   │   ├── random.cc
│   │   ├── seastar_test.cc
│   │   └── test_runner.cc
│   ├── util/
│   │   ├── alloc_failure_injector.cc
│   │   ├── backtrace.cc
│   │   ├── conversions.cc
│   │   ├── exceptions.cc
│   │   ├── file.cc
│   │   ├── log.cc
│   │   ├── process.cc
│   │   ├── program-options.cc
│   │   ├── read_first_line.cc
│   │   ├── short_streams.cc
│   │   └── tmp_file.cc
│   └── websocket/
│       ├── client.cc
│       ├── common.cc
│       ├── parser.cc
│       └── server.cc
├── test.py
└── tests/
    ├── CMakeLists.txt
    ├── fuzz/
    │   ├── CMakeLists.txt
    │   └── sstring_fuzz.cc
    ├── manual/
    │   ├── iosched.py
    │   ├── iosched_reproducers/
    │   │   ├── one_cpu_starved_shard_can_still_saturate_io.sh
    │   │   ├── one_cpu_starved_shard_has_reasonable_fairness.sh
    │   │   ├── scylla_tablet_migration.sh
    │   │   └── tau_nemesis.sh
    │   └── rl-iosched.py
    ├── perf/
    │   ├── CMakeLists.txt
    │   ├── allocator_perf.cc
    │   ├── container_perf.cc
    │   ├── coroutine_perf.cc
    │   ├── fair_queue_perf.cc
    │   ├── fstream_perf.cc
    │   ├── future_util_perf.cc
    │   ├── http_client_perf.cc
    │   ├── linux_perf_event.cc
    │   ├── metrics_perf.cc
    │   ├── perf-tests.md
    │   ├── perf_tests.cc
    │   ├── perf_tests_perf.cc
    │   ├── rpc_perf.cc
    │   ├── shared_token_bucket.cc
    │   ├── smp_submit_to_perf.cc
    │   └── thread_context_switch_test.cc
    └── unit/
        ├── CMakeLists.txt
        ├── abort_source_test.cc
        ├── abortable_fifo_test.cc
        ├── alien_test.cc
        ├── alloc_test.cc
        ├── allocator_test.cc
        ├── api.json
        ├── app-template_test.cc
        ├── cert.cfg.in
        ├── checked_ptr_test.cc
        ├── chunk_parsers_test.cc
        ├── chunked_fifo_test.cc
        ├── circular_buffer_fixed_capacity_test.cc
        ├── circular_buffer_test.cc
        ├── closeable_test.cc
        ├── condition_variable_test.cc
        ├── conf-example.yaml
        ├── connect_test.cc
        ├── content_source_test.cc
        ├── coroutines_test.cc
        ├── defer_test.cc
        ├── deleter_test.cc
        ├── directory_test.cc
        ├── distributed_test.cc
        ├── dns_test.cc
        ├── epoll_test.cc
        ├── exception_logging_test.cc
        ├── execution_stage_test.cc
        ├── expected_exception.hh
        ├── expiring_fifo_test.cc
        ├── fair_queue_test.cc
        ├── file_io_test.cc
        ├── file_utils_test.cc
        ├── foreign_ptr_test.cc
        ├── fsnotifier_test.cc
        ├── fstream_test.cc
        ├── futures_test.cc
        ├── gate_test.cc
        ├── generator_test.cc
        ├── httpd_test.cc
        ├── https-server.py
        ├── io_queue_test.cc
        ├── ipv6_test.cc
        ├── json2code_test.py
        ├── json_formatter_test.cc
        ├── libc_wrapper_test.cc
        ├── linux_perf_event_test.cc
        ├── locking_test.cc
        ├── log_buf_test.cc
        ├── loopback_socket.hh
        ├── lowres_clock_test.cc
        ├── memory-data-sink.hh
        ├── metrics_test.cc
        ├── metrics_tester.cc
        ├── mkcert.gmk
        ├── mkmtls.gmk
        ├── mock_file.hh
        ├── net_config_test.cc
        ├── network_interface_test.cc
        ├── noncopyable_function_test.cc
        ├── output_stream_test.cc
        ├── packet_test.cc
        ├── pipe_test.cc
        ├── program_options_test.cc
        ├── prometheus_http_test.cc
        ├── prometheus_test.py
        ├── prometheus_text_test.cc
        ├── proxy_protocol_test.cc
        ├── queue_test.cc
        ├── request_parser_test.cc
        ├── rest_api_httpd.cc
        ├── rpc_test.cc
        ├── scheduling_group_nesting_test.cc
        ├── scheduling_group_test.cc
        ├── semaphore_test.cc
        ├── sharded_test.cc
        ├── shared_ptr_test.cc
        ├── shared_token_bucket_test.cc
        ├── signal_test.cc
        ├── simple_stream_test.cc
        ├── slab_test.cc
        ├── smp_test.cc
        ├── socket_test.cc
        ├── source_location_test.cc
        ├── spawn_test.cc
        ├── sstring_test.cc
        ├── stall_detector_test.cc
        ├── stream_reader_test.cc
        ├── temporary_buffer_test.cc
        ├── test_fixture_test.cc
        ├── thread_test.cc
        ├── timer_test.cc
        ├── tl-generator.hh
        ├── tls-ca-bundle.pem
        ├── tls_test.cc
        ├── tmpdir.hh
        ├── tuple_utils_test.cc
        ├── uname_test.cc
        ├── unix_domain_test.cc
        ├── unwind_test.cc
        ├── variant_utils_test.cc
        ├── weak_ptr_test.cc
        └── websocket_test.cc
Download .txt
Showing preview only (1,497K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (10340 symbols across 523 files)

FILE: apps/httpd/main.cc
  class handl (line 45) | class handl : public httpd::handler_base {
    method handle (line 47) | virtual future<std::unique_ptr<http::reply> > handle(const sstring& path,
  function set_routes (line 55) | void set_routes(routes& r) {
  function main (line 80) | int main(int ac, char** av) {

FILE: apps/io_tester/io_tester.cc
  class context (line 74) | class context
    method context (line 1212) | context(sstring dir, directory_entry_type dtype, std::vector<job_confi...
    method stop (line 1223) | future<> stop() {
    method start (line 1229) | future<> start() {
    method issue_requests (line 1235) | future<> issue_requests() {
    method emit_results (line 1243) | future<> emit_results(YAML::Emitter& out) {
  type request_type (line 75) | enum class request_type { seqread, overwrite, randread, randwrite, appen...
  type std (line 77) | namespace std {
    type hash<request_type> (line 80) | struct hash<request_type> {
  function allocate_and_fill_buffer (line 88) | auto allocate_and_fill_buffer(size_t buffer_size) {
  function create_and_fill_file (line 98) | future<file> create_and_fill_file(sstring name, uint64_t fsize, open_fla...
  function busyloop_sleep (line 124) | future<> busyloop_sleep(std::chrono::steady_clock::time_point until, std...
  function timer_sleep (line 133) | future<> timer_sleep(std::chrono::steady_clock::time_point until, std::c...
  class pause_distribution (line 139) | class pause_distribution {
    method Dur (line 145) | Dur get_as() {
  class uniform_process (line 154) | class uniform_process : public pause_distribution {
    method uniform_process (line 158) | uniform_process(std::chrono::duration<double> period)
    method get (line 163) | std::chrono::duration<double> get() override {
  function make_uniform_pause (line 168) | std::unique_ptr<pause_distribution> make_uniform_pause(std::chrono::dura...
  class poisson_process (line 172) | class poisson_process : public pause_distribution {
    method poisson_process (line 178) | poisson_process(std::chrono::duration<double> period)
    method get (line 184) | std::chrono::duration<double> get() override {
  function make_poisson_pause (line 189) | std::unique_ptr<pause_distribution> make_poisson_pause(std::chrono::dura...
  type byte_size (line 193) | struct byte_size {
  type duration_time (line 197) | struct duration_time {
  class shard_config (line 201) | class shard_config {
    method shard_config (line 204) | shard_config()
    method shard_config (line 206) | shard_config(std::unordered_set<unsigned> s) : _shards(std::move(s)) {}
    method is_set (line 208) | bool is_set(unsigned cpu) const {
  type shard_info (line 213) | struct shard_info {
  type options (line 230) | struct options {
  class class_data (line 241) | class class_data
    method class_data (line 304) | class_data(job_config cfg)
    method think_tick (line 323) | void think_tick() {
    method issue_request (line 333) | future<> issue_request(char* buf, io_intent* intent, std::chrono::stea...
    method issue_requests_in_parallel (line 343) | future<> issue_requests_in_parallel(std::chrono::steady_clock::time_po...
    method issue_requests_at_rate (line 356) | future<> issue_requests_at_rate(std::chrono::steady_clock::time_point ...
    method issue_requests (line 395) | future<> issue_requests(std::chrono::steady_clock::time_point stop) {
    method think (line 408) | future<> think() {
    method start (line 426) | future<> start(sstring dir, directory_entry_type type) {
    method stop (line 436) | future<> stop() {
    method sstring (line 442) | const sstring name() const {
    method sstring (line 447) | sstring type_str() const {
    method request_type (line 463) | request_type req_type() const {
    method sstring (line 467) | sstring think_time() const {
    method req_size (line 475) | size_t req_size() const {
    method parallelism (line 479) | unsigned parallelism() const {
    method rps (line 483) | unsigned rps() const {
    method batch (line 487) | unsigned batch() const {
    method limit (line 491) | unsigned limit() const noexcept {
    method shares (line 495) | unsigned shares() const {
    method total_duration (line 499) | std::chrono::duration<float> total_duration() const {
    method file_size_mb (line 503) | uint64_t file_size_mb() const {
    method total_data (line 507) | uint64_t total_data() const {
    method max_latency (line 511) | uint64_t max_latency() const {
    method average_latency (line 515) | uint64_t average_latency() const {
    method quantile_latency (line 519) | uint64_t quantile_latency(double q) const {
    method requests (line 523) | uint64_t requests() const noexcept {
    method add_result (line 527) | void add_result(size_t data, std::chrono::microseconds latency) {
    method stop_hook (line 535) | virtual future<> stop_hook() {
  type job_config (line 243) | struct job_config {
  type sched_group_config (line 261) | struct sched_group_config {
  function maybe_remove_file (line 273) | future<> maybe_remove_file(sstring fname) {
  function maybe_close_file (line 277) | future<> maybe_close_file(file& f) {
  class class_data (line 281) | class class_data {
    method class_data (line 304) | class_data(job_config cfg)
    method think_tick (line 323) | void think_tick() {
    method issue_request (line 333) | future<> issue_request(char* buf, io_intent* intent, std::chrono::stea...
    method issue_requests_in_parallel (line 343) | future<> issue_requests_in_parallel(std::chrono::steady_clock::time_po...
    method issue_requests_at_rate (line 356) | future<> issue_requests_at_rate(std::chrono::steady_clock::time_point ...
    method issue_requests (line 395) | future<> issue_requests(std::chrono::steady_clock::time_point stop) {
    method think (line 408) | future<> think() {
    method start (line 426) | future<> start(sstring dir, directory_entry_type type) {
    method stop (line 436) | future<> stop() {
    method sstring (line 442) | const sstring name() const {
    method sstring (line 447) | sstring type_str() const {
    method request_type (line 463) | request_type req_type() const {
    method sstring (line 467) | sstring think_time() const {
    method req_size (line 475) | size_t req_size() const {
    method parallelism (line 479) | unsigned parallelism() const {
    method rps (line 483) | unsigned rps() const {
    method batch (line 487) | unsigned batch() const {
    method limit (line 491) | unsigned limit() const noexcept {
    method shares (line 495) | unsigned shares() const {
    method total_duration (line 499) | std::chrono::duration<float> total_duration() const {
    method file_size_mb (line 503) | uint64_t file_size_mb() const {
    method total_data (line 507) | uint64_t total_data() const {
    method max_latency (line 511) | uint64_t max_latency() const {
    method average_latency (line 515) | uint64_t average_latency() const {
    method quantile_latency (line 519) | uint64_t quantile_latency(double q) const {
    method requests (line 523) | uint64_t requests() const noexcept {
    method add_result (line 527) | void add_result(size_t data, std::chrono::microseconds latency) {
    method stop_hook (line 535) | virtual future<> stop_hook() {
  class io_class_data (line 540) | class io_class_data : public class_data {
    method on_io_completed (line 550) | future<size_t> on_io_completed(future<size_t> f) {
    method is_random (line 560) | bool is_random() const {
    method get_pos (line 564) | uint64_t get_pos() {
    method io_class_data (line 582) | io_class_data(job_config cfg)
    method do_start (line 589) | future<> do_start(sstring path, directory_entry_type type) override {
    method update_queue_length (line 596) | void update_queue_length() {
    method do_start_path (line 601) | future<> do_start_path(sstring path, directory_entry_type type) {
    method do_start_on_directory (line 617) | future<> do_start_on_directory(sstring dir) {
    method do_start_on_bdev (line 641) | future<> do_start_on_bdev(sstring name) {
    method do_start_on_dev_null (line 660) | future<> do_start_on_dev_null() {
    method get_one_metrics (line 670) | std::optional<double> get_one_metrics(sstring m_name, bool check_class...
    method emit_one_metrics (line 686) | void emit_one_metrics(YAML::Emitter& out, sstring m_name, bool check_c...
    method emit_metrics (line 692) | void emit_metrics(YAML::Emitter& out) {
    method emit_results (line 704) | virtual void emit_results(YAML::Emitter& out) override {
  class read_io_class_data (line 732) | class read_io_class_data : public io_class_data {
    method read_io_class_data (line 734) | read_io_class_data(job_config cfg) : io_class_data(std::move(cfg)) {}
    method issue_request (line 736) | future<size_t> issue_request(char *buf, io_intent* intent) override {
  class write_io_class_data (line 742) | class write_io_class_data : public io_class_data {
    method write_io_class_data (line 744) | write_io_class_data(job_config cfg) : io_class_data(std::move(cfg)) {}
    method issue_request (line 746) | future<size_t> issue_request(char *buf, io_intent* intent) override {
  class vectorized_read_io_class_data (line 752) | class vectorized_read_io_class_data : public io_class_data {
    method vectorized_read_io_class_data (line 758) | vectorized_read_io_class_data(job_config cfg)
    method issue_request (line 773) | future<size_t> issue_request(char *buf, io_intent* intent) override {
    method allocate_buffers (line 781) | void allocate_buffers() {
  class vectorized_write_io_class_data (line 793) | class vectorized_write_io_class_data : public io_class_data {
    method vectorized_write_io_class_data (line 799) | vectorized_write_io_class_data(job_config cfg)
    method issue_request (line 814) | future<size_t> issue_request(char *buf, io_intent* intent) override {
    method allocate_buffers (line 822) | void allocate_buffers() {
  class unlink_class_data (line 834) | class unlink_class_data : public class_data {
    method unlink_class_data (line 840) | unlink_class_data(job_config cfg) : class_data(std::move(cfg)) {
    method do_start (line 846) | future<> do_start(sstring path, directory_entry_type type) override {
    method issue_request (line 853) | future<size_t> issue_request(char *buf, io_intent* intent) override {
    method emit_results (line 868) | void emit_results(YAML::Emitter& out) override {
    method stop_hook (line 882) | future<> stop_hook() override {
    method files_count (line 893) | uint64_t files_count() const {
    method max_concurrency (line 897) | uint64_t max_concurrency() const {
    method all_files_removed (line 903) | bool all_files_removed() const {
    method sstring (line 907) | sstring get_filename(uint64_t file_id) const {
    method do_start_on_directory (line 911) | future<> do_start_on_directory(sstring path) {
  class cpu_class_data (line 932) | class cpu_class_data : public class_data {
    method cpu_class_data (line 934) | cpu_class_data(job_config cfg) : class_data(std::move(cfg)) {}
    method do_start (line 936) | future<> do_start(sstring dir, directory_entry_type type) override {
    method issue_request (line 940) | future<size_t> issue_request(char *buf, io_intent* intent) override {
    method emit_results (line 950) | virtual void emit_results(YAML::Emitter& out) override {
  type YAML (line 975) | namespace YAML {
    type convert<byte_size> (line 977) | struct convert<byte_size> {
      method decode (line 978) | static bool decode(const Node& node, byte_size& bs) {
    type convert<duration_time> (line 996) | struct convert<duration_time> {
      method decode (line 997) | static bool decode(const Node& node, duration_time& dt) {
    type convert<shard_config> (line 1025) | struct convert<shard_config> {
      method decode (line 1026) | static bool decode(const Node& node, shard_config& shards) {
    type convert<request_type> (line 1039) | struct convert<request_type> {
      method decode (line 1040) | static bool decode(const Node& node, request_type& rt) {
    type convert<shard_info> (line 1060) | struct convert<shard_info> {
      method decode (line 1061) | static bool decode(const Node& node, shard_info& sl) {
    type convert<options> (line 1109) | struct convert<options> {
      method decode (line 1110) | static bool decode(const Node& node, options& op) {
    type convert<job_config> (line 1153) | struct convert<job_config> {
      method decode (line 1154) | static bool decode(const Node& node, job_config& cl) {
    type convert<sched_group_config> (line 1189) | struct convert<sched_group_config> {
      method decode (line 1190) | static bool decode(const Node& node, sched_group_config& sc) {
  class context (line 1203) | class context {
    method context (line 1212) | context(sstring dir, directory_entry_type dtype, std::vector<job_confi...
    method stop (line 1223) | future<> stop() {
    method start (line 1229) | future<> start() {
    method issue_requests (line 1235) | future<> issue_requests() {
    method emit_results (line 1243) | future<> emit_results(YAML::Emitter& out) {
  function show_results (line 1260) | static void show_results(sharded<context>& ctx) {
  function main (line 1277) | int main(int ac, char** av) {

FILE: apps/io_tester/ioinfo.cc
  function main (line 31) | int main(int ac, char** av) {

FILE: apps/iotune/iotune.cc
  function check_device_properties (line 67) | void check_device_properties(fs::path dev_sys_file) {
  type evaluation_directory (line 102) | struct evaluation_directory {
    method scan_device (line 112) | void scan_device(unsigned dev_maj, unsigned dev_min) {
    method scan_device (line 116) | void scan_device(std::string dev_str) {
    method scan_device (line 120) | void scan_device(fs::path sys_file) {
    method evaluation_directory (line 166) | evaluation_directory(sstring name, unsigned force_io_depth)
    method max_iodepth (line 172) | unsigned max_iodepth() const {
    method path (line 176) | fs::path path() const {
    method sstring (line 180) | const sstring& name() const {
    method disks_per_array (line 184) | unsigned disks_per_array() const {
    method minimum_io_size (line 188) | uint64_t minimum_io_size() const {
    method reported_physical_block_size (line 192) | std::optional<uint64_t> reported_physical_block_size() const {
    method discover_directory (line 196) | future<> discover_directory() {
    method available_space (line 206) | uint64_t available_space() const {
  type io_rates (line 211) | struct io_rates {
    method io_rates (line 214) | io_rates operator+(const io_rates& a) const {
    method io_rates (line 218) | io_rates& operator+=(const io_rates& a) {
  type row_stats (line 225) | struct row_stats {
    method stdev_percents (line 230) | float stdev_percents() const {
  function row_stats (line 236) | static row_stats get_row_stats_for(const std::vector<T>& v) {
    method stdev_percents (line 230) | float stdev_percents() const {
  class invalid_position (line 248) | class invalid_position : public std::exception {
  type position_generator (line 255) | struct position_generator {
  class sequential_issuer (line 261) | class sequential_issuer : public position_generator {
    method sequential_issuer (line 266) | sequential_issuer(size_t buffer_size, uint64_t size_limit)
    method is_sequential (line 271) | virtual bool is_sequential() const {
    method get_pos (line 275) | virtual uint64_t get_pos() {
  class random_issuer (line 289) | class random_issuer : public position_generator {
    method random_issuer (line 294) | random_issuer(size_t buffer_size, uint64_t last_position)
    method is_sequential (line 300) | virtual bool is_sequential() const {
    method get_pos (line 304) | virtual uint64_t get_pos() {
  class request_issuer (line 313) | class request_issuer {
  class write_request_issuer (line 320) | class write_request_issuer : public request_issuer {
    method write_request_issuer (line 323) | explicit write_request_issuer(file f) : _file(f) {}
    method issue_request (line 324) | future<size_t> issue_request(uint64_t pos, char* buf, uint64_t size) o...
  class read_request_issuer (line 329) | class read_request_issuer : public request_issuer {
    method read_request_issuer (line 332) | explicit read_request_issuer(file f) : _file(f) {}
    method issue_request (line 333) | future<size_t> issue_request(uint64_t pos, char* buf, uint64_t size) o...
  function warmup_period (line 338) | std::chrono::duration<double>
  class io_worker (line 345) | class io_worker {
    class requests_rate_meter (line 346) | class requests_rate_meter {
      method requests_rate_meter (line 360) | requests_rate_meter(std::chrono::duration<double> duration, std::vec...
    method is_sequential (line 409) | bool is_sequential() const {
    method should_stop (line 413) | bool should_stop() const {
    method io_worker (line 417) | io_worker(size_t buffer_size, std::chrono::duration<double> duration, ...
    method get_buffer (line 428) | std::unique_ptr<char[], free_deleter> get_buffer() {
    method issue_request (line 432) | future<> issue_request(char* buf) {
    method max_offset (line 445) | uint64_t max_offset() const noexcept { return _max_offset; }
    method io_rates (line 447) | io_rates get_io_rates() const {
  class test_file (line 459) | class test_file {
    type pattern (line 461) | enum class pattern { sequential, random }
    type access_type (line 462) | enum class access_type { read, write }
    method get_position_generator (line 470) | std::unique_ptr<position_generator> get_position_generator(size_t buff...
    method calculate_buffer_size (line 478) | uint64_t calculate_buffer_size(pattern access_pattern, uint64_t buffer...
    method test_file (line 492) | test_file(const ::evaluation_directory& dir, uint64_t maximum_size, ui...
    method create_data_file (line 499) | future<> create_data_file() {
    method do_workload (line 519) | future<io_rates> do_workload(std::unique_ptr<io_worker> worker_ptr, un...
    method read_workload (line 549) | future<io_rates> read_workload(size_t buffer_size, pattern access_patt...
    method write_workload (line 555) | future<io_rates> write_workload(size_t buffer_size, pattern access_pat...
    method stop (line 566) | future<> stop() {
  class iotune_multi_shard_context (line 571) | class iotune_multi_shard_context {
    method per_shard_io_depth (line 576) | unsigned per_shard_io_depth() const {
    method stop (line 589) | future<> stop() {
    method start (line 593) | future<> start() {
    method get_serial_rates (line 600) | future<row_stats> get_serial_rates() {
    method get_sharded_worst_rates (line 606) | future<row_stats> get_sharded_worst_rates() {
    method create_data_file (line 617) | future<> create_data_file() {
    method write_sequential_data (line 623) | future<io_rates> write_sequential_data(unsigned shard, size_t buffer_s...
    method warm_up_sequential_data (line 629) | future<> warm_up_sequential_data(size_t buffer_size, std::chrono::dura...
    method read_sequential_data (line 638) | future<io_rates> read_sequential_data(unsigned shard, size_t buffer_si...
    method write_random_data (line 644) | future<io_rates> write_random_data(size_t buffer_size, std::chrono::du...
    method read_random_data (line 655) | future<io_rates> read_random_data(size_t buffer_size, std::chrono::dur...
    method saturate (line 668) | future<uint64_t> saturate(float rate_threshold, size_t buffer_size, st...
    method saturate_write (line 684) | future<uint64_t> saturate_write(float rate_threshold, size_t buffer_si...
    method saturate_read (line 688) | future<uint64_t> saturate_read(float rate_threshold, size_t buffer_siz...
    method detect_physical_block_size (line 700) | future<uint64_t> detect_physical_block_size(std::chrono::duration<doub...
    method iotune_multi_shard_context (line 774) | iotune_multi_shard_context(::evaluation_directory dir, uint64_t random...
  type disk_descriptor (line 781) | struct disk_descriptor {
  function string_to_file (line 792) | void string_to_file(sstring conf_file, sstring buf) {
  function write_configuration_file (line 800) | void write_configuration_file(sstring conf_file, std::string format, sst...
  function write_property_file (line 810) | void write_property_file(sstring conf_file, std::vector<disk_descriptor>...
  function mountpoint_of (line 842) | fs::path mountpoint_of(sstring filename) {
  function main (line 860) | int main(int ac, char** av) {

FILE: apps/lib/stop_signal.hh
  type seastar_apps_lib (line 31) | namespace seastar_apps_lib {
    class stop_signal (line 51) | class stop_signal {
      method signaled (line 55) | void signaled() {
      method stop_signal (line 63) | stop_signal() {
      method wait (line 72) | seastar::future<> wait() {
      method stopping (line 75) | bool stopping() const {

FILE: apps/memcached/memcache.cc
  type seastar (line 61) | namespace seastar { void append_buffers(jagged_array_of_buffers& vb, std...
    function append_buffers (line 1457) | void append_buffers(jagged_array_of_buffers& vb, std::span<temporary_b...
  type memcache (line 63) | namespace memcache {
    type expiration (line 94) | struct expiration {
      method expiration (line 101) | expiration() {}
      method expiration (line 103) | expiration(clock_type::duration wc_to_clock_type_delta, uint32_t s) {
      method ever_expires (line 127) | bool ever_expires() {
      method time_point (line 131) | time_point to_time_point() {
    class item (line 136) | class item : public slab_item_base {
      method item (line 158) | item(uint32_t slab_page_index, item_key&& key, sstring&& ascii_prefix,
      method item (line 180) | item(const item&) = delete;
      method item (line 181) | item(item&&) = delete;
      method get_timeout (line 183) | clock_type::time_point get_timeout() {
      method version_type (line 187) | version_type version() {
      method key (line 191) | const std::string_view key() const {
      method ascii_prefix (line 195) | const std::string_view ascii_prefix() const {
      method value (line 200) | const std::string_view value() const {
      method key_size (line 206) | size_t key_size() const {
      method ascii_prefix_size (line 210) | size_t ascii_prefix_size() const {
      method value_size (line 214) | size_t value_size() const {
      method data_as_integral (line 218) | optional<uint64_t> data_as_integral() {
      method cancel (line 239) | bool cancel() {
      method get_slab_page_index (line 244) | uint32_t get_slab_page_index() const {
      method is_unlocked (line 247) | bool is_unlocked() const {
      method hash_value (line 257) | std::size_t hash_value(const item &i) {
      method intrusive_ptr_add_ref (line 261) | inline void intrusive_ptr_add_ref(item* it) {
      method intrusive_ptr_release (line 269) | inline void intrusive_ptr_release(item* it) {
    type item_key_cmp (line 282) | struct item_key_cmp
      method compare (line 285) | bool compare(const item_key& key, const item& it) const {
    type cache_stats (line 302) | struct cache_stats {
    type cas_result (line 346) | enum class cas_result {
    type remote_origin_tag (line 350) | struct remote_origin_tag {
      method T (line 352) | static inline
    type local_origin_tag (line 358) | struct local_origin_tag {
      method T (line 360) | static inline
    type item_insertion_data (line 366) | struct item_insertion_data {
    class cache (line 373) | class cache {
      method item_size (line 392) | size_t item_size(item& item_ref) {
      method item_size (line 400) | size_t item_size(item_insertion_data& insertion) {
      method erase (line 421) | void erase(item& item_ref) {
      method expire (line 437) | void expire() {
      method cache_iterator (line 457) | inline
      method cache_iterator (line 463) | inline
      method add_new (line 485) | inline
      method maybe_rehash (line 500) | void maybe_rehash() {
      method cache (line 515) | cache(uint64_t per_cpu_slab_size, uint64_t slab_page_size)
      method flush_all (line 544) | void flush_all() {
      method flush_at (line 551) | void flush_at(uint32_t time) {
      method set (line 557) | bool set(item_insertion_data& insertion) {
      method add (line 571) | bool add(item_insertion_data& insertion) {
      method replace (line 583) | bool replace(item_insertion_data& insertion) {
      method remove (line 594) | bool remove(const item_key& key) {
      method item_ptr (line 606) | item_ptr get(const item_key& key) {
      method cas_result (line 618) | cas_result cas(item_insertion_data& insertion, item::version_type ve...
      method size (line 634) | size_t size() {
      method bucket_count (line 638) | size_t bucket_count() {
      method cache_stats (line 642) | cache_stats stats() {
      method incr (line 648) | std::pair<item_ptr, bool> incr(item_key& key, uint64_t delta) {
      method decr (line 671) | std::pair<item_ptr, bool> decr(item_key& key, uint64_t delta) {
      method print_hash_stats (line 693) | std::pair<unsigned, foreign_ptr<lw_shared_ptr<std::string>>> print_h...
      method stop (line 734) | future<> stop() { return make_ready_future<>(); }
      method get_wc_to_clock_type_delta (line 735) | clock_type::duration get_wc_to_clock_type_delta() { return _wc_to_cl...
    class sharded_cache (line 738) | class sharded_cache {
      method get_cpu (line 742) | inline
      method sharded_cache (line 747) | sharded_cache(sharded<cache>& peers) : _peers(peers) {}
      method flush_all (line 749) | future<> flush_all() {
      method flush_at (line 753) | future<> flush_at(uint32_t time) {
      method get_wc_to_clock_type_delta (line 757) | auto get_wc_to_clock_type_delta() { return _peers.local().get_wc_to_...
      method set (line 760) | future<bool> set(item_insertion_data& insertion) {
      method add (line 769) | future<bool> add(item_insertion_data& insertion) {
      method replace (line 778) | future<bool> replace(item_insertion_data& insertion) {
      method remove (line 787) | future<bool> remove(const item_key& key) {
      method get (line 793) | future<item_ptr> get(const item_key& key) {
      method cas (line 799) | future<cas_result> cas(item_insertion_data& insertion, item::version...
      method stats (line 807) | future<cache_stats> stats() {
      method incr (line 812) | future<std::pair<item_ptr, bool>> incr(item_key& key, uint64_t delta) {
      method decr (line 822) | future<std::pair<item_ptr, bool>> decr(item_key& key, uint64_t delta) {
      method print_hash_stats (line 831) | future<> print_hash_stats(output_stream<char>& out) {
    type system_stats (line 841) | struct system_stats {
      method system_stats (line 849) | system_stats() {
      method system_stats (line 852) | system_stats(clock_type::time_point start_time)
      method system_stats (line 855) | system_stats self() {
      method stop (line 866) | future<> stop() { return make_ready_future<>(); }
    class ascii_protocol (line 869) | class ascii_protocol {
      method append (line 894) | static void append(std::vector<temporary_buffer<char>>& bufs, const ...
      method append (line 900) | static void append(std::vector<temporary_buffer<char>>& bufs, const ...
      method append (line 901) | static void append(std::vector<temporary_buffer<char>>& bufs, const ...
      method serialize (line 904) | static void serialize(std::vector<temporary_buffer<char>>& bufs, ite...
      method handle_get (line 924) | future<> handle_get(output_stream<char>& out) {
      method print_stat (line 951) | static future<> print_stat(output_stream<char>& out, const char* key...
      method print_stats (line 959) | future<> print_stats(output_stream<char>& out) {
      method ascii_protocol (line 1042) | ascii_protocol(sharded_cache& cache, sharded<system_stats>& system_s...
      method prepare_insertion (line 1047) | void prepare_insertion() {
      method handle (line 1056) | future<> handle(input_stream<char>& in, output_stream<char>& out) {
    class udp_server (line 1234) | class udp_server {
      type header (line 1245) | struct header {
        method adjust_endianness (line 1252) | auto adjust_endianness(Adjuster a) {
      type connection (line 1257) | struct connection {
        method output_stream_options (line 1265) | static output_stream_options make_opts() noexcept {
        method connection (line 1271) | connection(ipv4_addr src, input_stream<char>&& in, size_t out_size,
        method respond (line 1279) | future<> respond(udp_channel& chan) {
      method udp_server (line 1295) | udp_server(sharded_cache& c, sharded<system_stats>& system_stats, ui...
      method set_max_datagram_size (line 1301) | void set_max_datagram_size(size_t max_datagram_size) {
      method as_input_stream (line 1306) | input_stream<char> as_input_stream(std::span<temporary_buffer<char>>...
      method start (line 1318) | void start() {
      method stop (line 1352) | future<> stop() {
    class tcp_server (line 1361) | class tcp_server {
      type connection (line 1368) | struct connection {
        method connection (line 1375) | connection(connected_socket&& socket, socket_address addr, sharded...
      method tcp_server (line 1391) | tcp_server(sharded_cache& cache, sharded<system_stats>& system_stats...
      method start (line 1397) | void start() {
      method stop (line 1418) | future<> stop() {
    class stats_printer (line 1426) | class stats_printer {
      method stats_printer (line 1431) | stats_printer(sharded_cache& cache)
      method start (line 1434) | void start() {
      method stop (line 1451) | future<> stop() { return make_ready_future<>(); }
  type seastar (line 1456) | namespace seastar {
    function append_buffers (line 1457) | void append_buffers(jagged_array_of_buffers& vb, std::span<temporary_b...
  function main (line 1466) | int main(int ac, char** av) {

FILE: apps/memcached/memcached.hh
  type memcache (line 23) | namespace memcache {
    class item (line 27) | class item
    class cache (line 28) | class cache
    class item_key (line 30) | class item_key {
      method item_key (line 35) | item_key() = default;
      method item_key (line 36) | item_key(item_key&) = default;
      method item_key (line 37) | item_key(sstring key)
      method item_key (line 41) | item_key(item_key&& other)
      method hash (line 47) | size_t hash() const {
      method sstring (line 50) | const sstring& key() const {
  type std (line 65) | namespace std {
    type hash<memcache::item_key> (line 68) | struct hash<memcache::item_key> {

FILE: apps/memcached/tests/test.py
  function run (line 27) | def run(args, cmd):

FILE: apps/memcached/tests/test_ascii_parser.cc
  function make_packet (line 36) | static std::vector<temporary_buffer<char>> make_packet(std::vector<std::...
  function parse (line 48) | static auto parse(std::vector<temporary_buffer<char>>&& bufs) {
  function SEASTAR_TEST_CASE (line 66) | SEASTAR_TEST_CASE(test_set_command_is_parsed) {
  function SEASTAR_TEST_CASE (line 80) | SEASTAR_TEST_CASE(test_empty_data_is_parsed) {
  function SEASTAR_TEST_CASE (line 94) | SEASTAR_TEST_CASE(test_superflous_data_is_an_error) {
  function SEASTAR_TEST_CASE (line 102) | SEASTAR_TEST_CASE(test_not_enough_data_is_an_error) {
  function SEASTAR_TEST_CASE (line 110) | SEASTAR_TEST_CASE(test_u32_parsing) {
  function SEASTAR_TEST_CASE (line 143) | SEASTAR_TEST_CASE(test_parsing_of_split_data) {
  function as_strings (line 227) | static std::vector<sstring> as_strings(std::vector<item_key>& keys) {
  function SEASTAR_TEST_CASE (line 235) | SEASTAR_TEST_CASE(test_get_parsing) {
  function SEASTAR_TEST_CASE (line 260) | SEASTAR_TEST_CASE(test_catches_errors_in_get) {
  function SEASTAR_TEST_CASE (line 272) | SEASTAR_TEST_CASE(test_parser_returns_eof_state_when_no_command_follows) {
  function SEASTAR_TEST_CASE (line 288) | SEASTAR_TEST_CASE(test_incomplete_command_is_an_error) {
  function SEASTAR_TEST_CASE (line 304) | SEASTAR_TEST_CASE(test_multiple_requests_in_one_stream) {

FILE: apps/memcached/tests/test_memcached.py
  class TimeoutError (line 33) | class TimeoutError(Exception):
  function tcp_connection (line 37) | def tcp_connection(timeout=1):
  function slow (line 47) | def slow(f):
  function recv_all (line 54) | def recv_all(s):
  function tcp_call (line 63) | def tcp_call(msg, timeout=1):
  function udp_call_for_fragments (line 73) | def udp_call_for_fragments(msg, timeout=1):
  function udp_call (line 107) | def udp_call(msg, **kwargs):
  class MemcacheTest (line 110) | class MemcacheTest(unittest.TestCase):
    method set (line 111) | def set(self, key, value, flags=0, expiry=0):
    method delete (line 114) | def delete(self, key):
    method assertHasKey (line 117) | def assertHasKey(self, key):
    method assertNoKey (line 122) | def assertNoKey(self, key):
    method setKey (line 127) | def setKey(self, key):
    method getItemVersion (line 130) | def getItemVersion(self, key):
    method getStat (line 134) | def getStat(self, name, call_fn=None):
    method flush (line 140) | def flush(self):
    method tearDown (line 143) | def tearDown(self):
  class TcpSpecificTests (line 146) | class TcpSpecificTests(MemcacheTest):
    method test_recovers_from_errors_in_the_stream (line 147) | def test_recovers_from_errors_in_the_stream(self):
    method test_incomplete_command_results_in_error (line 152) | def test_incomplete_command_results_in_error(self):
    method test_stream_closed_results_in_error (line 160) | def test_stream_closed_results_in_error(self):
    method test_unsuccesful_parsing_does_not_leave_data_behind (line 167) | def test_unsuccesful_parsing_does_not_leave_data_behind(self):
    method test_flush_all_no_reply (line 174) | def test_flush_all_no_reply(self):
    method test_set_no_reply (line 177) | def test_set_no_reply(self):
    method test_delete_no_reply (line 181) | def test_delete_no_reply(self):
    method test_add_no_reply (line 185) | def test_add_no_reply(self):
    method test_replace_no_reply (line 189) | def test_replace_no_reply(self):
    method test_cas_noreply (line 194) | def test_cas_noreply(self):
    method test_connection_statistics (line 211) | def test_connection_statistics(self):
  class UdpSpecificTests (line 227) | class UdpSpecificTests(MemcacheTest):
    method test_large_response_is_split_into_mtu_chunks (line 228) | def test_large_response_is_split_into_mtu_chunks(self):
  class TestCommands (line 244) | class TestCommands(MemcacheTest):
    method test_basic_commands (line 245) | def test_basic_commands(self):
    method test_error_handling (line 253) | def test_error_handling(self):
    method test_expiry (line 257) | def test_expiry(self):
    method test_expiry_at_epoch_time (line 264) | def test_expiry_at_epoch_time(self):
    method test_multiple_keys_in_get (line 271) | def test_multiple_keys_in_get(self):
    method test_flush_all (line 279) | def test_flush_all(self):
    method test_keys_set_after_flush_remain (line 284) | def test_keys_set_after_flush_remain(self):
    method test_flush_all_with_timeout_flushes_all_keys_even_those_set_after_flush (line 291) | def test_flush_all_with_timeout_flushes_all_keys_even_those_set_after_...
    method test_subsequent_flush_is_merged (line 301) | def test_subsequent_flush_is_merged(self):
    method test_immediate_flush_cancels_delayed_flush (line 313) | def test_immediate_flush_cancels_delayed_flush(self):
    method test_flushing_in_the_past (line 322) | def test_flushing_in_the_past(self):
    method test_memcache_does_not_crash_when_flushing_with_already_expred_items (line 333) | def test_memcache_does_not_crash_when_flushing_with_already_expred_ite...
    method test_response_spanning_many_datagrams (line 338) | def test_response_spanning_many_datagrams(self):
    method test_version (line 361) | def test_version(self):
    method test_add (line 364) | def test_add(self):
    method test_replace (line 369) | def test_replace(self):
    method test_cas_and_gets (line 375) | def test_cas_and_gets(self):
    method test_curr_items_stat (line 389) | def test_curr_items_stat(self):
    method test_how_stats_change_with_different_commands (line 396) | def test_how_stats_change_with_different_commands(self):
    method test_incr (line 502) | def test_incr(self):
    method test_decr (line 521) | def test_decr(self):
    method test_incr_and_decr_on_invalid_input (line 543) | def test_incr_and_decr_on_invalid_input(self):
  function wait_for_memcache_tcp (line 553) | def wait_for_memcache_tcp(timeout=4):
  function wait_for_memcache_udp (line 567) | def wait_for_memcache_udp(timeout=4):

FILE: apps/rpc_tester/rpc_tester.cc
  type serializer (line 53) | struct serializer {}
  function write_arithmetic_type (line 56) | inline
  function T (line 63) | inline
  function write (line 72) | inline void write(serializer, Output& output, int32_t v) { return write_...
  function write (line 74) | inline void write(serializer, Output& output, uint32_t v) { return write...
  function write (line 76) | inline void write(serializer, Output& output, int64_t v) { return write_...
  function write (line 78) | inline void write(serializer, Output& output, uint64_t v) { return write...
  function write (line 80) | inline void write(serializer, Output& output, double v) { return write_a...
  function read (line 82) | inline int32_t read(serializer, Input& input, rpc::type<int32_t>) { retu...
  function read (line 84) | inline uint32_t read(serializer, Input& input, rpc::type<uint32_t>) { re...
  function read (line 86) | inline uint64_t read(serializer, Input& input, rpc::type<uint64_t>) { re...
  function read (line 88) | inline uint64_t read(serializer, Input& input, rpc::type<int64_t>) { ret...
  function read (line 90) | inline double read(serializer, Input& input, rpc::type<double>) { return...
  function write (line 93) | inline void write(serializer, Output& out, const sstring& v) {
  function sstring (line 99) | inline sstring read(serializer, Input& in, rpc::type<sstring>) {
  function write (line 109) | inline void write(serializer, Output& out, const payload_t& v) {
  function payload_t (line 115) | inline payload_t read(serializer, Input& in, rpc::type<payload_t>) {
  class pause_distribution (line 123) | class pause_distribution {
    method Dur (line 129) | Dur get_as() {
  class steady_process (line 136) | class steady_process : public pause_distribution {
    method steady_process (line 139) | steady_process(std::chrono::duration<double> period) : _pause(period) { }
    method get (line 140) | std::chrono::duration<double> get() override { return _pause; }
  function make_steady_pause (line 143) | std::unique_ptr<pause_distribution> make_steady_pause(std::chrono::durat...
  class uniform_process (line 147) | class uniform_process : public pause_distribution {
    method uniform_process (line 153) | uniform_process(std::chrono::duration<double> min, std::chrono::durati...
    method get (line 156) | std::chrono::duration<double> get() override {
  type duration_range (line 161) | struct duration_range {
  function make_uniform_pause (line 166) | std::unique_ptr<pause_distribution> make_uniform_pause(duration_range ra...
  type client_config (line 170) | struct client_config {
  type server_config (line 174) | struct server_config {
  type job_config (line 178) | struct job_config {
  type config (line 199) | struct config {
  type duration_time (line 205) | struct duration_time {
  type byte_size (line 209) | struct byte_size {
  type YAML (line 213) | namespace YAML {
    type convert<client_config> (line 216) | struct convert<client_config> {
      method decode (line 217) | static bool decode(const Node& node, client_config& cfg) {
    type convert<server_config> (line 226) | struct convert<server_config> {
      method decode (line 227) | static bool decode(const Node& node, server_config& cfg) {
    type convert<job_config> (line 236) | struct convert<job_config> {
      method decode (line 237) | static bool decode(const Node& node, job_config& cfg) {
    type convert<config> (line 285) | struct convert<config> {
      method decode (line 286) | static bool decode(const Node& node, config& cfg) {
    type convert<duration_time> (line 301) | struct convert<duration_time> {
      method decode (line 302) | static bool decode(const Node& node, duration_time& dt) {
    type convert<byte_size> (line 333) | struct convert<byte_size> {
      method decode (line 334) | static bool decode(const Node& node, byte_size& bs) {
  type rpc_verb (line 352) | enum class rpc_verb : int32_t {
  class job (line 364) | class job {
  class job_rpc (line 372) | class job_rpc : public job {
    method call_echo (line 385) | future<> call_echo(unsigned dummy) {
    method call_write (line 394) | future<> call_write(unsigned dummy, const payload_t& pl) {
    method job_rpc (line 402) | job_rpc(job_config cfg, rpc_protocol& rpc, client_config ccfg, socket_...
    method name (line 430) | virtual std::string name() const override { return _cfg.name; }
    method run (line 432) | virtual future<> run() override {
    method emit_result (line 468) | virtual void emit_result(YAML::Emitter& out) const override {
  class job_rpc_streaming (line 481) | class job_rpc_streaming : public job {
    method job_rpc_streaming (line 496) | job_rpc_streaming(job_config cfg, rpc_protocol& rpc, client_config ccf...
    method name (line 517) | virtual std::string name() const override { return _cfg.name; }
    method stream_data (line 520) | future<> stream_data(rpc::sink<payload_t> sink, const payload_t& paylo...
    method run_streaming_worker (line 550) | future<> run_streaming_worker(unsigned worker_id, const payload_t& pay...
    method run_worker_with_delay (line 571) | future<> run_worker_with_delay(unsigned worker_id, const payload_t& pa...
    method run (line 580) | virtual future<> run() override {
    method emit_result (line 597) | virtual void emit_result(YAML::Emitter& out) const override {
    method process_bi_source (line 613) | static future<> process_bi_source(rpc::source<payload_t> source, rpc::...
    method process_uni_source (line 646) | static future<> process_uni_source(rpc::source<payload_t> source, rpc:...
  class job_cpu (line 684) | class job_cpu : public job {
    method make_pause (line 691) | std::unique_ptr<pause_distribution> make_pause() {
    method make_sleep (line 699) | std::unique_ptr<pause_distribution> make_sleep() {
    method job_cpu (line 710) | job_cpu(job_config cfg)
    method name (line 717) | virtual std::string name() const override { return _cfg.name; }
    method emit_result (line 718) | virtual void emit_result(YAML::Emitter& out) const override {
    method run (line 722) | virtual future<> run() override {
  class context (line 745) | class context {
    method make_job (line 755) | std::unique_ptr<job> make_job(job_config cfg, std::optional<socket_add...
    method run_jobs (line 769) | future<> run_jobs() {
    method isolate_connection (line 775) | rpc::isolation_config isolate_connection(std::string group_name) {
    method context (line 784) | context(std::optional<socket_address> laddr, std::optional<socket_addr...
    method start (line 848) | future<> start() {
    method stop (line 856) | future<> stop() {
    method run (line 870) | future<> run() {
    method emit_result (line 882) | future<> emit_result(YAML::Emitter& out) const {
  function main (line 894) | int main(int ac, char** av) {

FILE: apps/seawreck/seawreck.cc
  function http_debug (line 34) | void http_debug(const char* fmt, Args&&... args) {
  class http_client (line 40) | class http_client {
    method http_client (line 53) | http_client(unsigned duration, unsigned total_conn, unsigned reqs_per_...
    class connection (line 61) | class connection {
      method connection (line 70) | connection(connected_socket&& fd, http_client* client)
      method nr_done (line 77) | uint64_t nr_done() {
      method do_req (line 81) | future<> do_req() {
    method total_reqs (line 114) | future<uint64_t> total_reqs() {
    method done (line 119) | bool done(uint64_t nr_done) {
    method connect (line 127) | future<> connect(ipv4_addr server_addr) {
    method run (line 140) | future<> run() {
    method stop (line 167) | future<> stop() {
  function main (line 174) | int main(int ac, char** av) {

FILE: cmake/check-seastar-include-style.py
  function check_includes (line 26) | def check_includes(files, dirname):
  function main (line 40) | def main():

FILE: cmake/code_tests/LinuxMembarrier_test.cc
  function main (line 5) | int main() {

FILE: cmake/code_tests/Sanitizers_fiber_test.cc
  function main (line 8) | int main() {

FILE: cmake/code_tests/Source_location_default_argument.cc
  function test_source_location (line 3) | int test_source_location(int line,
  function main (line 8) | int main() {

FILE: cmake/code_tests/Source_location_test.cc
  type format_info (line 13) | struct format_info {
    method format_info (line 14) | format_info(source_location loc = source_location::current()) noexcept
  type format_info (line 20) | struct format_info { }
    method format_info (line 14) | format_info(source_location loc = source_location::current()) noexcept
  function main (line 23) | int main()

FILE: cmake/code_tests/rt_test.cc
  function main (line 6) | int main() {

FILE: cmake/code_tests/stdout_test.cc
  type logger_type (line 3) | enum class logger_type {
  function main (line 8) | int main() {}

FILE: configure.py
  function add_tristate (line 31) | def add_tristate(arg_parser, name, dest, help, default=None):
  function try_compile (line 38) | def try_compile(compiler, source='', flags=[]):
  function ensure_tmp_dir_exists (line 42) | def ensure_tmp_dir_exists():
  function try_compile_and_link (line 47) | def try_compile_and_link(compiler, source='', flags=[]):
  function standard_supported (line 65) | def standard_supported(standard, compiler='g++'):
  function find_compiler_cache (line 69) | def find_compiler_cache(preference):
  function find_compiler (line 105) | def find_compiler(name):
  function resolve_compilers_for_compiler_cache (line 128) | def resolve_compilers_for_compiler_cache(args, compiler_cache):
  function identify_best_standard (line 232) | def identify_best_standard(cpp_standards, compiler):
  function get_valid_ingredients (line 263) | def get_valid_ingredients():
  function configure_mode (line 273) | def configure_mode(mode):

FILE: demos/block_discard_demo.cc
  type file_test (line 35) | struct file_test {
    method file_test (line 36) | file_test(file&& f) : f(std::move(f)) {}
  function main (line 41) | int main(int ac, char** av) {

FILE: demos/coroutines_demo.cc
  function main (line 35) | int main(int argc, char** argv) {

FILE: demos/echo_demo.cc
  function dump_packet (line 35) | void dump_packet(const packet& p) {
  function echo_packet (line 46) | future<> echo_packet(net::qp& netif, packet p) {
  function usage (line 83) | void usage()
  function main (line 91) | int main(int ac, char** av) {

FILE: demos/file_demo.cc
  function verify_data_file (line 50) | future<> verify_data_file(file& f, temporary_buffer<char>& rbuf, const t...
  function open_data_file (line 58) | future<file> open_data_file(sstring meta_filename, temporary_buffer<char...
  function demo_with_file (line 70) | future<> demo_with_file() {
  function demo_with_file_close_on_failure (line 112) | future<> demo_with_file_close_on_failure() {
  function demo_with_io_intent (line 175) | future<> demo_with_io_intent(std::chrono::duration<double> d) {
  function main (line 237) | int main(int ac, char** av) {

FILE: demos/hello-cxx-module.cc
  function main (line 27) | int main(int argc, char** argv) {

FILE: demos/hello-world.cc
  function main (line 29) | int main(int argc, char** argv) {

FILE: demos/http_client_demo.cc
  type printer (line 38) | struct printer {
  function main (line 48) | int main(int ac, char** av) {

FILE: demos/ip_demo.cc
  function main (line 33) | int main(int ac, char** av) {

FILE: demos/l3_demo.cc
  function dump_arp_packets (line 31) | void dump_arp_packets(l3_protocol& proto) {
  function main (line 39) | int main(int ac, char** av) {

FILE: demos/line_count_demo.cc
  type reader (line 35) | struct reader {
    method reader (line 37) | reader(file f)
  function main (line 57) | int main(int ac, char** av) {

FILE: demos/rpc_demo.cc
  type serializer (line 34) | struct serializer {
  function write_arithmetic_type (line 38) | inline
  function T (line 45) | inline
  function write (line 54) | inline void write(serializer, Output& output, int32_t v) { return write_...
  function write (line 56) | inline void write(serializer, Output& output, uint32_t v) { return write...
  function write (line 58) | inline void write(serializer, Output& output, int64_t v) { return write_...
  function write (line 60) | inline void write(serializer, Output& output, uint64_t v) { return write...
  function write (line 62) | inline void write(serializer, Output& output, double v) { return write_a...
  function read (line 64) | inline int32_t read(serializer, Input& input, rpc::type<int32_t>) { retu...
  function read (line 66) | inline uint32_t read(serializer, Input& input, rpc::type<uint32_t>) { re...
  function read (line 68) | inline uint64_t read(serializer, Input& input, rpc::type<uint64_t>) { re...
  function read (line 70) | inline uint64_t read(serializer, Input& input, rpc::type<int64_t>) { ret...
  function read (line 72) | inline double read(serializer, Input& input, rpc::type<double>) { return...
  function write (line 75) | inline void write(serializer, Output& out, const sstring& v) {
  function sstring (line 81) | inline sstring read(serializer, Input& in, rpc::type<sstring>) {
  class mycomp (line 91) | class mycomp : public rpc::compressor::factory {
    method sstring (line 94) | virtual const sstring& supported() const override {
    method negotiate (line 98) | virtual std::unique_ptr<rpc::compressor> negotiate(sstring feature, bo...
  function main (line 104) | int main(int ac, char** av) {

FILE: demos/scheduling_group_demo.cc
  function compute_intensive_task (line 41) | future<>
  function heavy_task (line 51) | future<>
  function light_task (line 59) | future<>
  function medium_task (line 67) | future<>
  function run_compute_intensive_tasks (line 77) | future<>
  function run_compute_intensive_tasks_in_threads (line 91) | future<>
  function run_with_duty_cycle (line 105) | future<>
  function var_fn (line 135) | auto var_fn(T& var) {
  function main (line 139) | int main(int ac, char** av) {

FILE: demos/sharded_parameter_demo.cc
  class service_one (line 32) | class service_one {
    method get_capacity (line 36) | int get_capacity() const { return _capacity; }
  class service_two (line 40) | class service_two {
    method service_two (line 43) | service_two(service_one& s1, int resource_allocation) : _resource_allo...
    method get_resource_allocation (line 44) | int get_resource_allocation() const { return _resource_allocation; }
  function main (line 47) | int main(int ac, char** av) {

FILE: demos/tcp_demo.cc
  type tcp_test (line 32) | struct tcp_test {
    type connection (line 36) | struct connection {
      method connection (line 38) | explicit connection(tcp::connection tc) : tcp_conn(std::move(tc)) {}
      method run (line 39) | void run() {
    method tcp_test (line 54) | tcp_test(ipv4& inet) : inet(inet), _listener(inet.get_tcp().listen(100...
    method run (line 55) | void run() {
  function main (line 64) | int main(int ac, char** av) {

FILE: demos/tcp_sctp_client_demo.cc
  class client (line 39) | class client
    class connection (line 56) | class connection {
      method connection (line 63) | connection(connected_socket&& fd)
      method do_read (line 68) | future<> do_read() {
      method do_write (line 79) | future<> do_write(int end) {
      method ping (line 91) | future<> ping(int times) {
      method rxrx (line 114) | future<size_t> rxrx() {
      method txtx (line 126) | future<size_t> txtx() {
    method ping_test (line 137) | future<> ping_test(connection *conn) {
    method rxrx_test (line 145) | future<> rxrx_test(connection *conn) {
    method txtx_test (line 153) | future<> txtx_test(connection *conn) {
    method ping_report (line 161) | void ping_report(lowres_clock::time_point started, lowres_clock::time_...
    method rxtx_report (line 183) | void rxtx_report(lowres_clock::time_point started, lowres_clock::time_...
    method start (line 206) | future<> start(ipv4_addr server_addr, std::string test, unsigned ncon) {
    method stop (line 228) | future<> stop() {
  class client (line 44) | class client {
    class connection (line 56) | class connection {
      method connection (line 63) | connection(connected_socket&& fd)
      method do_read (line 68) | future<> do_read() {
      method do_write (line 79) | future<> do_write(int end) {
      method ping (line 91) | future<> ping(int times) {
      method rxrx (line 114) | future<size_t> rxrx() {
      method txtx (line 126) | future<size_t> txtx() {
    method ping_test (line 137) | future<> ping_test(connection *conn) {
    method rxrx_test (line 145) | future<> rxrx_test(connection *conn) {
    method txtx_test (line 153) | future<> txtx_test(connection *conn) {
    method ping_report (line 161) | void ping_report(lowres_clock::time_point started, lowres_clock::time_...
    method rxtx_report (line 183) | void rxtx_report(lowres_clock::time_point started, lowres_clock::time_...
    method start (line 206) | future<> start(ipv4_addr server_addr, std::string test, unsigned ncon) {
    method stop (line 228) | future<> stop() {
  function main (line 238) | int main(int ac, char ** av) {

FILE: demos/tcp_sctp_server_demo.cc
  class tcp_server (line 48) | class tcp_server {
    method listen (line 55) | future<> listen(ipv4_addr addr) {
    method stop (line 74) | future<> stop() {
    method do_accepts (line 79) | future<> do_accepts(std::vector<server_socket>& listeners) {
    method do_stop (line 104) | static future<> do_stop(std::vector<server_socket>& listeners, std::op...
    class connection (line 113) | class connection {
      method connection (line 118) | connection(tcp_server& server, connected_socket&& fd, socket_address...
      method process (line 122) | future<> process() {
      method read (line 125) | future<> read() {
      method do_write (line 159) | future<> do_write(int end) {
      method tx_test (line 169) | future<> tx_test() {
      method do_read (line 176) | future<> do_read() {
      method rx_test (line 185) | future<> rx_test() {
  function main (line 195) | int main(int ac, char** av) {

FILE: demos/tls_echo_server.hh
  type streams (line 34) | struct streams {
    method streams (line 39) | streams(connected_socket cs) : s(std::move(cs)), in(s.input()), out(s....
  class echoserver (line 43) | class echoserver {
    method echoserver (line 50) | echoserver(bool verbose = false)
    method listen (line 55) | future<> listen(socket_address addr, sstring crtfile, sstring keyfile,...
    method stop (line 116) | future<> stop() {

FILE: demos/tls_echo_server_demo.cc
  function main (line 35) | int main(int ac, char** av) {

FILE: demos/tls_simple_client_demo.cc
  function main (line 36) | int main(int ac, char** av) {

FILE: demos/tutorial_examples.cc
  function service_loop (line 29) | seastar::future<> service_loop() {
  function service_loop_2 (line 43) | seastar::future<> service_loop_2() {
  function handle_connection_3 (line 64) | seastar::future<> handle_connection_3(seastar::connected_socket s,
  function service_loop_3 (line 89) | seastar::future<> service_loop_3() {
  function main (line 111) | int main(int ac, char** av) {

FILE: demos/udp_client_demo.cc
  class client (line 32) | class client {
    method start (line 40) | void start(ipv4_addr server_addr) {
  function main (line 79) | int main(int ac, char ** av) {

FILE: demos/udp_server_demo.cc
  class udp_server (line 34) | class udp_server {
    method start (line 41) | void start(uint16_t port) {
    method stop (line 62) | future<> stop() {
  function main (line 77) | int main(int ac, char ** av) {

FILE: demos/udp_zero_copy_demo.cc
  function to_seconds (line 39) | typename Duration::rep to_seconds(Duration d) {
  class server (line 43) | class server {
    method server (line 63) | server()
    method send (line 66) | future<> send(ipv4_addr dst, std::vector<temporary_buffer<char>> bufs) {
    method start (line 71) | void start(int chunk_size, bool copy, size_t mem_size) {
  function main (line 120) | int main(int ac, char ** av) {

FILE: demos/websocket_client_demo.cc
  function main (line 36) | int main(int argc, char** argv) {

FILE: demos/websocket_server_demo.cc
  function main (line 37) | int main(int argc, char** argv) {

FILE: doc/htmlsplit.py
  function add_elem_to_body (line 40) | def add_elem_to_body(tree, e):
  function add_nav_to_body (line 45) | def add_nav_to_body(tree, chap_num):
  function handle_toc (line 71) | def handle_toc(toc):
  function fix_links (line 94) | def fix_links(e):
  function remove_ns_prefix (line 105) | def remove_ns_prefix(tree):
  function get_chap_num (line 112) | def get_chap_num(element):

FILE: include/seastar/core/abort_on_ebadf.hh
  type seastar (line 25) | namespace seastar {

FILE: include/seastar/core/abort_on_expiry.hh
  type seastar (line 29) | namespace seastar {
    class abort_on_expiry (line 37) | class abort_on_expiry {
      method abort_on_expiry (line 46) | abort_on_expiry(time_point timeout) : _tr([this] {
      method abort_on_expiry (line 51) | abort_on_expiry(abort_on_expiry&&) = delete;

FILE: include/seastar/core/abort_source.hh
  type seastar (line 37) | namespace seastar {
    class abort_requested_exception (line 45) | class abort_requested_exception : public std::exception {
    class abort_source (line 55) | class abort_source {
      class subscription (line 63) | class subscription : public bi::list_base_hook<bi::link_mode<bi::aut...
        method subscription (line 69) | explicit subscription(abort_source& as, subscription_callback_type...
        type naive_cb_tag (line 76) | struct naive_cb_tag {}
        method subscription (line 77) | explicit subscription(naive_cb_tag, abort_source& as, naive_subscr...
        method on_abort (line 90) | void on_abort(const std::optional<std::exception_ptr>& ex) noexcept {
        method subscription (line 98) | subscription() = default;
        method subscription (line 100) | subscription(subscription&& other) noexcept(std::is_nothrow_move_c...
        method subscription (line 107) | subscription& operator=(subscription&& other) noexcept(std::is_not...
      method do_request_abort (line 127) | void do_request_abort(std::optional<std::exception_ptr> ex) noexcept {
      method abort_source (line 141) | abort_source() = default;
      method abort_source (line 144) | abort_source(abort_source&&) = default;
      method abort_source (line 145) | abort_source& operator=(abort_source&&) = default;
      method subscribe (line 165) | [[nodiscard]]
      method request_abort (line 177) | void request_abort() noexcept {
      method request_abort_ex (line 184) | void request_abort_ex(std::exception_ptr ex) noexcept {
      method request_abort_ex (line 192) | void request_abort_ex(Exception&& e) noexcept {
      method abort_requested (line 197) | bool abort_requested() const noexcept {
      method check (line 203) | void check() const {
      method get_default_exception (line 216) | virtual std::exception_ptr get_default_exception() const noexcept {
  type fmt::formatter<seastar::abort_requested_exception> (line 229) | struct fmt::formatter<seastar::abort_requested_exception> : fmt::formatt...
    method format (line 230) | auto format(const seastar::abort_requested_exception& e, fmt::format_c...

FILE: include/seastar/core/abortable_fifo.hh
  type seastar (line 33) | namespace seastar {
    type internal (line 35) | namespace internal {
      type noop_aborter (line 46) | struct noop_aborter {
      class abortable_fifo (line 61) | class abortable_fifo {
        type entry (line 63) | struct entry {
          method entry (line 66) | entry(T&& payload_) : payload(std::move(payload_)) {}
          method entry (line 67) | entry(const T& payload_) : payload(payload_) {}
          method entry (line 68) | entry(T payload_, abortable_fifo& ef, abort_source& as)
          method entry (line 80) | entry() = default;
          method entry (line 81) | entry(entry&& x) = delete;
          method entry (line 82) | entry(const entry& x) = delete;
        method drop_expired_front (line 97) | void drop_expired_front() noexcept {
        method abortable_fifo (line 106) | abortable_fifo() noexcept = default;
        method abortable_fifo (line 107) | abortable_fifo(OnAbort on_abort) noexcept(std::is_nothrow_move_con...
        method abortable_fifo (line 109) | abortable_fifo(abortable_fifo&& o) noexcept
        method abortable_fifo (line 115) | abortable_fifo& operator=(abortable_fifo&& o) noexcept {
        method empty (line 128) | bool empty() const noexcept {
        method T (line 139) | T& front() noexcept {
        method T (line 148) | const T& front() const noexcept {
        method size (line 158) | size_t size() const noexcept {
        method reserve (line 166) | void reserve(size_t size) {
        method push_back (line 172) | void push_back(const T& payload) {
        method push_back (line 183) | void push_back(T&& payload) {
        method push_back (line 194) | void push_back(T&& payload, abort_source& as) {
        method T (line 213) | T& emplace_back(U&&... args) {
        method make_back_abortable (line 232) | void make_back_abortable(abort_source& as) {
        method pop_front (line 257) | void pop_front() noexcept {

FILE: include/seastar/core/alien.hh
  type seastar (line 39) | namespace seastar {
    class reactor (line 41) | class reactor
    type alien (line 44) | namespace alien {
      class message_queue (line 46) | class message_queue {
        type work_item (line 49) | struct work_item
        type lf_queue_remote (line 50) | struct lf_queue_remote {
        type lf_queue (line 55) | struct lf_queue : lf_queue_remote, lf_queue_base {
          method lf_queue (line 56) | lf_queue(reactor* remote)
        type work_item (line 72) | struct work_item {
        type async_work_item (line 77) | struct async_work_item : work_item {
          method async_work_item (line 79) | async_work_item(Func&& func) : _func(std::move(func)) {}
          method process (line 80) | void process() override {
        method submit (line 92) | void submit(Func&& func) {
      type internal (line 100) | namespace internal {
        type qs_deleter (line 102) | struct qs_deleter {
          method qs_deleter (line 104) | qs_deleter(unsigned n = 0) : count(n) {}
        type return_type_of (line 153) | struct return_type_of {
          method set (line 155) | static void set(std::promise<void>& p, return_value_t<Func>&&) {
        type return_type_of<Func, false> (line 160) | struct return_type_of<Func, false> {
          method set (line 163) | static void set(std::promise<type>& p, return_value_t<Func>&& t) {
      class instance (line 114) | class instance {
      type internal (line 123) | namespace internal {
        type qs_deleter (line 102) | struct qs_deleter {
          method qs_deleter (line 104) | qs_deleter(unsigned n = 0) : count(n) {}
        type return_type_of (line 153) | struct return_type_of {
          method set (line 155) | static void set(std::promise<void>& p, return_value_t<Func>&&) {
        type return_type_of<Func, false> (line 160) | struct return_type_of<Func, false> {
          method set (line 163) | static void set(std::promise<type>& p, return_value_t<Func>&& t) {
      function run_on (line 143) | void run_on(instance& instance, unsigned shard, Func func) {
      type internal (line 147) | namespace internal {
        type qs_deleter (line 102) | struct qs_deleter {
          method qs_deleter (line 104) | qs_deleter(unsigned n = 0) : count(n) {}
        type return_type_of (line 153) | struct return_type_of {
          method set (line 155) | static void set(std::promise<void>& p, return_value_t<Func>&&) {
        type return_type_of<Func, false> (line 160) | struct return_type_of<Func, false> {
          method set (line 163) | static void set(std::promise<type>& p, return_value_t<Func>&& t) {
      function submit_to (line 180) | std::future<T> submit_to(instance& instance, unsigned shard, Func fu...

FILE: include/seastar/core/align.hh
  type seastar (line 27) | namespace seastar {
    function T (line 31) | inline constexpr
    function T (line 37) | inline constexpr
    function T (line 44) | inline constexpr
    function T (line 50) | inline constexpr

FILE: include/seastar/core/aligned_buffer.hh
  type seastar (line 25) | namespace seastar {
    type internal (line 27) | namespace internal {
    type free_deleter (line 32) | struct free_deleter {
    function allocate_aligned_buffer (line 37) | inline

FILE: include/seastar/core/app-template.hh
  type seastar (line 34) | namespace seastar {
    class smp (line 36) | class smp
    type alien (line 38) | namespace alien {
      class instance (line 40) | class instance
    class app_template (line 44) | class app_template {
      type config (line 46) | struct config {
        method config (line 79) | config() {}
      type seastar_options (line 83) | struct seastar_options : public program_options::option_group {
      type positional_option (line 137) | struct positional_option {

FILE: include/seastar/core/bitops.hh
  type seastar (line 27) | namespace seastar {
    function count_leading_zeros (line 30) | inline
    function count_leading_zeros (line 35) | inline
    function count_leading_zeros (line 40) | inline
    function count_trailing_zeros (line 45) | inline
    function count_trailing_zeros (line 50) | inline
    function count_trailing_zeros (line 55) | inline
    function log2ceil (line 61) | inline constexpr unsigned log2ceil(T n) {
    function log2floor (line 69) | inline constexpr unsigned log2floor(T n) {

FILE: include/seastar/core/bitset-iter.hh
  type seastar (line 19) | namespace seastar {
    type bitsets (line 21) | namespace bitsets {
      function get_first_set (line 105) | inline size_t get_first_set(const std::bitset<N>& bitset) noexcept
      function get_last_set (line 116) | inline size_t get_last_set(const std::bitset<N>& bitset) noexcept
      class set_iterator (line 124) | class set_iterator
        method advance (line 127) | void advance() noexcept
        method set_iterator (line 145) | set_iterator() noexcept
        method set_iterator (line 150) | set_iterator(std::bitset<N> bitset, int offset = 0) noexcept
        method set_iterator (line 159) | set_iterator& operator++() noexcept
        method set_iterator (line 165) | set_iterator operator++(int) noexcept
      class set_range (line 192) | class set_range
        method set_range (line 198) | constexpr set_range(std::bitset<N> bitset, int offset = 0) noexcept
        method iterator (line 204) | iterator begin() const noexcept { return iterator(_bitset, _offset...
        method iterator (line 205) | iterator end() const noexcept { return iterator(0); }
      function for_each_set (line 212) | inline set_range<N> for_each_set(std::bitset<N> bitset, int offset =...

FILE: include/seastar/core/byteorder.hh
  type seastar (line 28) | namespace seastar {
    function T (line 32) | inline T cpu_to_le(T x) noexcept {
    function T (line 36) | inline T le_to_cpu(T x) noexcept {
    function T (line 41) | inline T cpu_to_be(T x) noexcept {
    function T (line 45) | inline T be_to_cpu(T x) noexcept {
    function T (line 50) | inline T cpu_to_le(const unaligned<T>& v) noexcept {
    function T (line 55) | inline T le_to_cpu(const unaligned<T>& v) noexcept {
    function T (line 60) | inline
    function write_le (line 69) | inline
    function T (line 77) | inline
    function write_be (line 86) | inline
    function T (line 94) | inline
    function produce_be (line 103) | inline

FILE: include/seastar/core/cacheline.hh
  type seastar (line 26) | namespace seastar {

FILE: include/seastar/core/checked_ptr.hh
  type seastar (line 30) | namespace seastar {
    class checked_ptr_is_null_exception (line 34) | class checked_ptr_is_null_exception : public std::exception {}
    type default_null_deref_action (line 41) | struct default_null_deref_action {
    type internal (line 50) | namespace internal {
      function T (line 71) | inline T* checked_ptr_do_get(T* ptr) noexcept {
    class checked_ptr (line 97) | class checked_ptr {
      method check (line 110) | void check() const {
      method checked_ptr (line 117) | checked_ptr() noexcept(noexcept(Ptr(nullptr))) = default;
      method checked_ptr (line 118) | checked_ptr(std::nullptr_t) noexcept(std::is_nothrow_default_constru...
      method checked_ptr (line 119) | checked_ptr(Ptr&& ptr) noexcept(std::is_nothrow_move_constructible_v...
      method checked_ptr (line 120) | checked_ptr(const Ptr& p) noexcept(std::is_nothrow_copy_constructibl...
      method pointer (line 128) | pointer get() const {
      method Ptr (line 135) | const Ptr& operator->() const {
      method Ptr (line 142) | Ptr& operator->() {
      method element_type (line 149) | const element_type& operator*() const {
      method element_type (line 156) | element_type& operator*() {
      method hash (line 175) | size_t hash() const {
  type std (line 183) | namespace std {
    type hash<seastar::checked_ptr<T>> (line 186) | struct hash<seastar::checked_ptr<T>> {

FILE: include/seastar/core/chunked_fifo.hh
  type seastar (line 31) | namespace seastar {
    class chunked_fifo (line 90) | class chunked_fifo {
      method maybe_item (line 94) | maybe_item() noexcept {}
      type chunk (line 98) | struct chunk {
        type chunk (line 100) | struct chunk
        method size (line 106) | size_t size() const {
      class basic_iterator (line 139) | class basic_iterator {
        method basic_iterator (line 159) | basic_iterator() noexcept = default;
        method basic_iterator (line 162) | inline basic_iterator(const basic_iterator<OtherIsConst>& o) noexcept
      method chunked_fifo (line 177) | chunked_fifo() noexcept = default;
    function T (line 512) | inline
    function T (line 519) | inline
    function T (line 526) | inline T&

FILE: include/seastar/core/circular_buffer.hh
  type seastar (line 30) | namespace seastar {
    class circular_buffer (line 59) | class circular_buffer {
      type impl (line 60) | struct impl : Alloc {
        method impl (line 67) | impl(Alloc a) noexcept : Alloc(std::move(a)) { }
        method reset (line 68) | void reset() {
      method circular_buffer (line 87) | circular_buffer() noexcept requires std::default_initializable<Alloc...
      method circular_buffer (line 90) | circular_buffer(const circular_buffer& X) = delete;
      method circular_buffer (line 92) | circular_buffer& operator=(const circular_buffer&) = delete;
      type cbiterator (line 127) | struct cbiterator {
        method ValueType (line 134) | ValueType& operator*() const noexcept { return cb->_impl.storage[c...
        method ValueType (line 135) | ValueType* operator->() const noexcept { return &cb->_impl.storage...
        method difference_type (line 190) | difference_type operator-(const cbiterator<CB, ValueType>& rhs) co...
        method cbiterator (line 193) | cbiterator() = default;
        method cbiterator (line 197) | cbiterator(CB* b, size_t i) noexcept : cb(b), idx(i) {}
      method iterator (line 206) | iterator begin() noexcept {
      method const_iterator (line 209) | const_iterator begin() const noexcept {
      method iterator (line 212) | iterator end() noexcept {
      method const_iterator (line 215) | const_iterator end() const noexcept {
      method const_iterator (line 218) | const_iterator cbegin() const noexcept {
      method const_iterator (line 221) | const_iterator cend() const noexcept {
    function T (line 422) | inline
    function T (line 429) | inline
    function T (line 436) | inline
    function T (line 443) | inline
    function T (line 466) | inline
    function T (line 473) | inline
    function T (line 480) | inline

FILE: include/seastar/core/circular_buffer_fixed_capacity.hh
  type seastar (line 42) | namespace seastar {
    class circular_buffer_fixed_capacity (line 52) | class circular_buffer_fixed_capacity {
      method maybe_storage (line 57) | maybe_storage() noexcept {}
      method mask (line 62) | static size_t mask(size_t idx) { return idx % Capacity; }
      method T (line 63) | T* obj(size_t idx) { return &_storage[mask(idx)].data; }
      method T (line 64) | const T* obj(size_t idx) const { return &_storage[mask(idx)].data; }
      class cbiterator (line 78) | class cbiterator {
        method cbiterator (line 83) | cbiterator(holder* start, size_t idx) noexcept : _start(start), _i...
        method ValueType (line 92) | ValueType& operator*() const { return _start[mask(_idx)].data; }
        method ValueType (line 93) | ValueType* operator->() const { return &operator*(); }
        method cbiterator (line 95) | cbiterator& operator++() {
        method cbiterator (line 100) | cbiterator operator++(int) {
        method cbiterator (line 106) | cbiterator& operator--() {
        method cbiterator (line 111) | cbiterator operator--(int) {
        method cbiterator (line 116) | cbiterator operator+(difference_type n) const {
        method cbiterator (line 119) | cbiterator operator+(difference_type n, cbiterator i) {
        method cbiterator (line 122) | cbiterator operator-(difference_type n) const {
        method cbiterator (line 125) | cbiterator& operator+=(difference_type n) {
        method cbiterator (line 129) | cbiterator& operator-=(difference_type n) {
        method difference_type (line 151) | difference_type operator-(const cbiterator& rhs) const {
      method circular_buffer_fixed_capacity (line 160) | circular_buffer_fixed_capacity() = default;
      method iterator (line 181) | iterator begin() {
      method const_iterator (line 184) | const_iterator begin() const {
      method iterator (line 187) | iterator end() {
      method const_iterator (line 190) | const_iterator end() const {
      method const_iterator (line 193) | const_iterator cbegin() const {
      method const_iterator (line 196) | const_iterator cend() const {
    function T (line 265) | inline
    function T (line 291) | inline
    function T (line 300) | inline
    function T (line 307) | inline
    function T (line 330) | inline
    function calc_circular_buffer_capacity (line 380) | constexpr inline size_t calc_circular_buffer_capacity() {

FILE: include/seastar/core/condition-variable.hh
  type seastar (line 34) | namespace seastar {
    class broken_condition_variable (line 42) | class broken_condition_variable : public std::exception {
    class condition_variable_timed_out (line 50) | class condition_variable_timed_out : public std::exception {
    class condition_variable (line 69) | class condition_variable {
      type waiter (line 73) | struct waiter : public boost::intrusive::list_base_hook<boost::intru...
        method waiter (line 74) | waiter() = default;
        method waiter (line 75) | waiter(waiter&&) = default;
        method waiter (line 76) | waiter(const waiter&) = delete;
        method waiter (line 77) | waiter& operator=(const waiter&) = delete;
      type promise_waiter (line 85) | struct promise_waiter : public waiter, public promise<> {
        method signal (line 86) | void signal() noexcept override {
        method set_exception (line 93) | void set_exception(std::exception_ptr ep) noexcept override {
      type awaiter (line 100) | struct [[nodiscard("must co_await a when() call")]] awaiter : public...
        method awaiter (line 104) | awaiter(condition_variable* cv)
        method signal (line 108) | void signal() noexcept override {
        method set_exception (line 111) | void set_exception(std::exception_ptr ep) noexcept override {
      type timeout_awaiter (line 124) | struct [[nodiscard("must co_await a when() call")]] timeout_awaiter ...
        method timeout_awaiter (line 130) | timeout_awaiter(condition_variable* cv, time_point timeout)
        method signal (line 134) | void signal() noexcept override {
        method set_exception (line 138) | void set_exception(std::exception_ptr ep) noexcept override {
      type predicate_awaiter (line 153) | struct [[nodiscard("must co_await a when() call")]] predicate_awaite...
        method predicate_awaiter (line 156) | predicate_awaiter(Func func, Args&& ...args)
        method signal (line 160) | void signal() noexcept override {
      method condition_variable (line 201) | condition_variable() noexcept = default;
      method condition_variable (line 202) | condition_variable(condition_variable&& rhs) noexcept = default;
      method wait (line 210) | future<> wait() noexcept {
      method wait (line 228) | future<> wait(std::chrono::time_point<Clock, Duration> timeout) noex...
      method wait (line 251) | future<> wait(std::chrono::duration<Rep, Period> timeout) noexcept {
      method wait (line 264) | future<> wait(Pred&& pred) noexcept {
      method wait (line 281) | future<> wait(std::chrono::time_point<Clock, Duration> timeout, Pred...
      method wait (line 298) | future<> wait(std::chrono::duration<Rep, Period> timeout, Pred&& pre...
      method awaiter (line 308) | awaiter when() noexcept {
        method awaiter (line 104) | awaiter(condition_variable* cv)
        method signal (line 108) | void signal() noexcept override {
        method set_exception (line 111) | void set_exception(std::exception_ptr ep) noexcept override {
      method when (line 321) | timeout_awaiter<Clock, Duration> when(std::chrono::time_point<Clock,...
      method when (line 334) | auto when(std::chrono::duration<Rep, Period> timeout) noexcept {
      method when (line 348) | auto when(Pred&& pred) noexcept {
      method when (line 364) | auto when(std::chrono::time_point<Clock, Duration> timeout, Pred&& p...
      method when (line 380) | auto when(std::chrono::duration<Rep, Period> timeout, Pred&& pred) n...
      method has_waiters (line 386) | bool has_waiters() const noexcept {

FILE: include/seastar/core/coroutine.hh
  type seastar (line 46) | namespace seastar {
    type internal (line 48) | namespace internal {
      function execute_involving_handle_destruction_in_await_suspend (line 51) | inline
      function execute_involving_handle_destruction_in_await_suspend (line 62) | inline
      class coroutine_allocators (line 72) | class coroutine_allocators {
      class coroutine_traits_base (line 89) | class coroutine_traits_base {
        class promise_type (line 91) | class promise_type final : public seastar::task, public coroutine_...
          method promise_type (line 94) | promise_type() = default;
          method promise_type (line 95) | promise_type(promise_type&&) = delete;
          method promise_type (line 96) | promise_type(const promise_type&) = delete;
          method return_value (line 99) | void return_value(U&&... value) {
          method return_value (line 103) | void return_value(coroutine::exception ce) noexcept {
          method set_exception (line 107) | void set_exception(std::exception_ptr&& eptr) noexcept {
          method return_value (line 111) | [[deprecated("Forwarding coroutine returns are deprecated as too...
          method unhandled_exception (line 116) | void unhandled_exception() noexcept {
          method get_return_object (line 120) | seastar::future<T> get_return_object() noexcept {
          method initial_suspend (line 124) | std::suspend_never initial_suspend() noexcept { return { }; }
          method final_suspend (line 125) | std::suspend_never final_suspend() noexcept { return { }; }
          method run_and_dispose (line 127) | virtual void run_and_dispose() noexcept override {
          method task (line 132) | task* waiting_task() noexcept override { return _promise.waiting...
          method scheduling_group (line 134) | scheduling_group set_scheduling_group(scheduling_group sg) noexc...
      class coroutine_traits_base<> (line 141) | class coroutine_traits_base<> {
        class promise_type (line 143) | class promise_type final : public seastar::task, public coroutine_...
          method promise_type (line 146) | promise_type() = default;
          method promise_type (line 147) | promise_type(promise_type&&) = delete;
          method promise_type (line 148) | promise_type(const promise_type&) = delete;
          method return_void (line 150) | void return_void() noexcept {
          method set_exception (line 154) | void set_exception(std::exception_ptr&& eptr) noexcept {
          method unhandled_exception (line 158) | void unhandled_exception() noexcept {
          method get_return_object (line 162) | seastar::future<> get_return_object() noexcept {
          method initial_suspend (line 166) | std::suspend_never initial_suspend() noexcept { return { }; }
          method final_suspend (line 167) | std::suspend_never final_suspend() noexcept { return { }; }
          method run_and_dispose (line 169) | virtual void run_and_dispose() noexcept override {
          method task (line 174) | task* waiting_task() noexcept override { return _promise.waiting...
          method scheduling_group (line 176) | scheduling_group set_scheduling_group(scheduling_group new_sg) n...
      type awaiter (line 183) | struct awaiter {
        method awaiter (line 186) | explicit awaiter(seastar::future<T>&& f) noexcept : _future(std::m...
        method awaiter (line 188) | awaiter(const awaiter&) = delete;
        method awaiter (line 189) | awaiter(awaiter&&) = delete;
        method await_ready (line 191) | bool await_ready() const noexcept {
        method await_suspend (line 196) | void await_suspend(std::coroutine_handle<U> hndl SEASTAR_COROUTINE...
        method T (line 205) | T await_resume() { return _future.get(); }
      type awaiter<CheckPreempt, void> (line 209) | struct awaiter<CheckPreempt, void> {
        method awaiter (line 212) | explicit awaiter(seastar::future<>&& f) noexcept : _future(std::mo...
        method awaiter (line 214) | awaiter(const awaiter&) = delete;
        method awaiter (line 215) | awaiter(awaiter&&) = delete;
        method await_ready (line 217) | bool await_ready() const noexcept {
        method await_suspend (line 222) | void await_suspend(std::coroutine_handle<U> hndl SEASTAR_COROUTINE...
        method await_resume (line 231) | void await_resume() { _future.get(); }
    type coroutine (line 242) | namespace coroutine {
      type without_preemption_check (line 248) | struct [[nodiscard]] without_preemption_check : public seastar::futu...
        method without_preemption_check (line 249) | explicit without_preemption_check(seastar::future<T>&& f) noexcept...
      class lambda (line 273) | class lambda {
        method lambda (line 278) | explicit lambda(Func&& func) : _func(&func) {}
  type std (line 300) | namespace std {
  class coroutine_traits<seastar::future<T>, Args...> (line 303) | class coroutine_traits<seastar::future<T>, Args...> : public seastar::in...

FILE: include/seastar/core/deleter.hh
  type seastar (line 30) | namespace seastar {
    class deleter (line 48) | class deleter final {
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    type deleter::impl (line 111) | struct deleter::impl {
      method impl (line 114) | impl(deleter next) : next(std::move(next)) {}
    function deleter (line 130) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    type lambda_deleter_impl (line 141) | struct lambda_deleter_impl final : deleter::impl {
      method lambda_deleter_impl (line 143) | lambda_deleter_impl(deleter next, Deleter&& del)
    type object_deleter_impl (line 149) | struct object_deleter_impl final : deleter::impl {
      method object_deleter_impl (line 151) | object_deleter_impl(deleter next, Object&& obj)
    function deleter (line 171) | deleter
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    function deleter (line 182) | deleter
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    type free_deleter_impl (line 188) | struct free_deleter_impl final : deleter::impl {
      method free_deleter_impl (line 190) | free_deleter_impl(void* obj) : impl(deleter()), obj(obj) {}
      method free_deleter_impl (line 191) | free_deleter_impl(const free_deleter_impl&) = delete;
      method free_deleter_impl (line 192) | free_deleter_impl(free_deleter_impl&&) = delete;
    function deleter (line 197) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    function deleter (line 244) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    function deleter (line 259) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    function deleter (line 268) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {
    function deleter (line 277) | inline
      type impl (line 51) | struct impl
      type raw_object_tag (line 52) | struct raw_object_tag {}
      method deleter (line 59) | deleter() noexcept = default;
      method deleter (line 60) | deleter(const deleter&) = delete;
      method deleter (line 62) | deleter(deleter&& x) noexcept : _impl(x._impl) { x._impl = nullptr; }
      method deleter (line 64) | explicit deleter(impl* i) noexcept : _impl(i) {}
      method deleter (line 65) | deleter(raw_object_tag, void* object) noexcept
      method deleter (line 71) | deleter& operator=(deleter&) = delete;
      method reset (line 81) | void reset(impl* i) {
      method is_raw_object (line 90) | static bool is_raw_object(impl* i) noexcept {
      method is_raw_object (line 94) | bool is_raw_object() const noexcept {
      method impl (line 104) | impl* from_raw_object(void* object) noexcept {

FILE: include/seastar/core/disk_params.hh
  type seastar (line 30) | namespace seastar {
    type smp_options (line 32) | struct smp_options
    type internal (line 34) | namespace internal {
      type disk_params (line 36) | struct disk_params {
      class disk_config_params (line 50) | class disk_config_params {
        method disk_config_params (line 60) | explicit disk_config_params(unsigned max_queues) noexcept
        method per_io_group (line 64) | uint64_t per_io_group(uint64_t qty, unsigned nr_groups) const noex...
        method num_io_groups (line 68) | unsigned num_io_groups() const noexcept { return _num_io_groups; }
        method latency_goal (line 70) | std::chrono::duration<double> latency_goal() const {
        method stall_threshold (line 74) | std::chrono::milliseconds stall_threshold() const {
        method latency_goal_opt (line 78) | double latency_goal_opt(const reactor_options& opts) const {
        type io_queue::config (line 86) | struct io_queue::config
        type io_queue::config (line 87) | struct io_queue::config
        method queue_ids (line 89) | auto queue_ids() {

FILE: include/seastar/core/distributed.hh
  type seastar (line 26) | namespace seastar {

FILE: include/seastar/core/do_with.hh
  type seastar (line 29) | namespace seastar {
    type internal (line 34) | namespace internal {
      class do_with_state (line 37) | class do_with_state final : public continuation_base_from_future<Fut...
        method do_with_state (line 42) | explicit do_with_state(T&&... args) : _held(std::forward<T>(args)....
        method run_and_dispose (line 43) | virtual void run_and_dispose() noexcept override {
        method task (line 47) | task* waiting_task() noexcept override {
        method HeldState (line 50) | HeldState& data() {
        method Future (line 53) | Future get_future() {
      function cherry_pick_tuple (line 63) | inline
      type subtuple (line 70) | struct subtuple
      function do_with_impl (line 78) | inline
    type internal (line 61) | namespace internal {
      class do_with_state (line 37) | class do_with_state final : public continuation_base_from_future<Fut...
        method do_with_state (line 42) | explicit do_with_state(T&&... args) : _held(std::forward<T>(args)....
        method run_and_dispose (line 43) | virtual void run_and_dispose() noexcept override {
        method task (line 47) | task* waiting_task() noexcept override {
        method HeldState (line 50) | HeldState& data() {
        method Future (line 53) | Future get_future() {
      function cherry_pick_tuple (line 63) | inline
      type subtuple (line 70) | struct subtuple
      function do_with_impl (line 78) | inline
    function do_with (line 129) | inline
    function with_lock (line 144) | inline
  type subtuple<Tuple, std::index_sequence<Idx...>> (line 73) | struct subtuple<Tuple, std::index_sequence<Idx...>> {

FILE: include/seastar/core/dpdk_rte.hh
  type seastar (line 40) | namespace seastar {
    type dpdk (line 42) | namespace dpdk {
      class eal (line 45) | class eal {

FILE: include/seastar/core/enum.hh
  type seastar (line 34) | namespace seastar {
    class enum_hash (line 38) | class enum_hash {

FILE: include/seastar/core/exception_hacks.hh
  type seastar (line 24) | namespace seastar {

FILE: include/seastar/core/execution_stage.hh
  type seastar (line 38) | namespace seastar {
    type internal (line 73) | namespace internal {
      type reference_wrapper_for_es (line 83) | struct reference_wrapper_for_es : reference_wrapper<T> {
        method reference_wrapper_for_es (line 84) | reference_wrapper_for_es(reference_wrapper <T> rw) noexcept
      type wrap_for_es (line 89) | struct wrap_for_es {
      type wrap_for_es<T&> (line 94) | struct wrap_for_es<T&> {
      type wrap_for_es<T&&> (line 99) | struct wrap_for_es<T&&> {
      function unwrap_for_es (line 104) | decltype(auto) unwrap_for_es(T&& object) {
      function unwrap_for_es (line 109) | std::reference_wrapper<T> unwrap_for_es(reference_wrapper_for_es<T> ...
      class execution_stage_manager (line 187) | class execution_stage_manager {
        method execution_stage_manager (line 191) | execution_stage_manager() = default;
        method execution_stage_manager (line 192) | execution_stage_manager(const execution_stage_manager&) = delete;
        method execution_stage_manager (line 193) | execution_stage_manager(execution_stage_manager&&) = delete;
      class concrete_execution_stage_base (line 208) | class concrete_execution_stage_base : public execution_stage {
        type work_item (line 220) | struct work_item {
          method work_item (line 224) | work_item(typename internal::wrap_for_es<Args>::type... args) : ...
          method work_item (line 226) | work_item(work_item&& other) = delete;
          method work_item (line 227) | work_item(const work_item&) = delete;
          method work_item (line 228) | work_item(work_item&) = delete;
        method unwrap (line 234) | auto unwrap(input_type&& in) {
        method do_flush (line 240) | virtual void do_flush() noexcept override {
        method concrete_execution_stage_base (line 257) | explicit concrete_execution_stage_base(const sstring& name, schedu...
        method concrete_execution_stage_base (line 263) | explicit concrete_execution_stage_base(const sstring& name, noncop...
        method return_type (line 288) | return_type operator()(typename internal::wrap_for_es<Args>::type....
      type concrete_execution_stage_helper (line 442) | struct concrete_execution_stage_helper
    class execution_stage (line 117) | class execution_stage {
      type stats (line 119) | struct stats {
      method execution_stage (line 138) | execution_stage(const execution_stage&) = delete;
      method sstring (line 149) | const sstring& name() const noexcept { return _name; }
      method stats (line 152) | const stats& get_stats() const noexcept { return _stats; }
      method poll (line 166) | bool poll() const noexcept {
      method scheduling_group (line 171) | scheduling_group get_scheduling_group() const noexcept { return _sg; }
      method update_name_and_metric_group (line 174) | void update_name_and_metric_group() {
    type internal (line 185) | namespace internal {
      type reference_wrapper_for_es (line 83) | struct reference_wrapper_for_es : reference_wrapper<T> {
        method reference_wrapper_for_es (line 84) | reference_wrapper_for_es(reference_wrapper <T> rw) noexcept
      type wrap_for_es (line 89) | struct wrap_for_es {
      type wrap_for_es<T&> (line 94) | struct wrap_for_es<T&> {
      type wrap_for_es<T&&> (line 99) | struct wrap_for_es<T&&> {
      function unwrap_for_es (line 104) | decltype(auto) unwrap_for_es(T&& object) {
      function unwrap_for_es (line 109) | std::reference_wrapper<T> unwrap_for_es(reference_wrapper_for_es<T> ...
      class execution_stage_manager (line 187) | class execution_stage_manager {
        method execution_stage_manager (line 191) | execution_stage_manager() = default;
        method execution_stage_manager (line 192) | execution_stage_manager(const execution_stage_manager&) = delete;
        method execution_stage_manager (line 193) | execution_stage_manager(execution_stage_manager&&) = delete;
      class concrete_execution_stage_base (line 208) | class concrete_execution_stage_base : public execution_stage {
        type work_item (line 220) | struct work_item {
          method work_item (line 224) | work_item(typename internal::wrap_for_es<Args>::type... args) : ...
          method work_item (line 226) | work_item(work_item&& other) = delete;
          method work_item (line 227) | work_item(const work_item&) = delete;
          method work_item (line 228) | work_item(work_item&) = delete;
        method unwrap (line 234) | auto unwrap(input_type&& in) {
        method do_flush (line 240) | virtual void do_flush() noexcept override {
        method concrete_execution_stage_base (line 257) | explicit concrete_execution_stage_base(const sstring& name, schedu...
        method concrete_execution_stage_base (line 263) | explicit concrete_execution_stage_base(const sstring& name, noncop...
        method return_type (line 288) | return_type operator()(typename internal::wrap_for_es<Args>::type....
      type concrete_execution_stage_helper (line 442) | struct concrete_execution_stage_helper
    class concrete_execution_stage (line 314) | class concrete_execution_stage final : public internal::concrete_execu...
    class inheriting_execution_stage (line 319) | class inheriting_execution_stage {
      type per_scheduling_group_stats (line 321) | struct per_scheduling_group_stats {
    class inheriting_concrete_execution_stage (line 338) | class inheriting_concrete_execution_stage final : public inheriting_ex...
      class per_group_stage_type (line 342) | class per_group_stage_type final : public internal::concrete_executi...
        method sstring (line 343) | static sstring format_name(const sstring& name, scheduling_group s...
        method per_group_stage_type (line 348) | per_group_stage_type(const sstring& base_name, scheduling_group sg...
        method per_group_stage_type (line 353) | per_group_stage_type(const sstring& name, noncopyable_function<Ret...
        method update_name (line 357) | void update_name() override {
      method per_group_stage_type (line 369) | per_group_stage_type make_stage_for_group(scheduling_group sg) {
        method sstring (line 343) | static sstring format_name(const sstring& name, scheduling_group s...
        method per_group_stage_type (line 348) | per_group_stage_type(const sstring& base_name, scheduling_group sg...
        method per_group_stage_type (line 353) | per_group_stage_type(const sstring& name, noncopyable_function<Ret...
        method update_name (line 357) | void update_name() override {
      method inheriting_concrete_execution_stage (line 384) | inheriting_concrete_execution_stage(const sstring& name, noncopyable...
      method return_type (line 408) | return_type operator()(typename internal::wrap_for_es<Args>::type......
      method get_stats (line 425) | inheriting_execution_stage::stats get_stats() const noexcept {
    type internal (line 439) | namespace internal {
      type reference_wrapper_for_es (line 83) | struct reference_wrapper_for_es : reference_wrapper<T> {
        method reference_wrapper_for_es (line 84) | reference_wrapper_for_es(reference_wrapper <T> rw) noexcept
      type wrap_for_es (line 89) | struct wrap_for_es {
      type wrap_for_es<T&> (line 94) | struct wrap_for_es<T&> {
      type wrap_for_es<T&&> (line 99) | struct wrap_for_es<T&&> {
      function unwrap_for_es (line 104) | decltype(auto) unwrap_for_es(T&& object) {
      function unwrap_for_es (line 109) | std::reference_wrapper<T> unwrap_for_es(reference_wrapper_for_es<T> ...
      class execution_stage_manager (line 187) | class execution_stage_manager {
        method execution_stage_manager (line 191) | execution_stage_manager() = default;
        method execution_stage_manager (line 192) | execution_stage_manager(const execution_stage_manager&) = delete;
        method execution_stage_manager (line 193) | execution_stage_manager(execution_stage_manager&&) = delete;
      class concrete_execution_stage_base (line 208) | class concrete_execution_stage_base : public execution_stage {
        type work_item (line 220) | struct work_item {
          method work_item (line 224) | work_item(typename internal::wrap_for_es<Args>::type... args) : ...
          method work_item (line 226) | work_item(work_item&& other) = delete;
          method work_item (line 227) | work_item(const work_item&) = delete;
          method work_item (line 228) | work_item(work_item&) = delete;
        method unwrap (line 234) | auto unwrap(input_type&& in) {
        method do_flush (line 240) | virtual void do_flush() noexcept override {
        method concrete_execution_stage_base (line 257) | explicit concrete_execution_stage_base(const sstring& name, schedu...
        method concrete_execution_stage_base (line 263) | explicit concrete_execution_stage_base(const sstring& name, noncop...
        method return_type (line 288) | return_type operator()(typename internal::wrap_for_es<Args>::type....
      type concrete_execution_stage_helper (line 442) | struct concrete_execution_stage_helper
    function make_execution_stage (line 484) | auto make_execution_stage(const sstring& name, scheduling_group sg, Fu...
    function make_execution_stage (line 523) | auto make_execution_stage(const sstring& name, Function&& fn) {
    function make_execution_stage (line 551) | concrete_execution_stage<Ret, Object*, Args...>
    function make_execution_stage (line 557) | concrete_execution_stage<Ret, const Object*, Args...>
    function make_execution_stage (line 563) | concrete_execution_stage<Ret, Object*, Args...>
    function make_execution_stage (line 569) | concrete_execution_stage<Ret, const Object*, Args...>
  type concrete_execution_stage_helper<Ret, std::tuple<Args...>> (line 445) | struct concrete_execution_stage_helper<Ret, std::tuple<Args...>> {

FILE: include/seastar/core/expiring_fifo.hh
  type seastar (line 33) | namespace seastar {
    type dummy_expiry (line 36) | struct dummy_expiry {
    type promise_expiry (line 41) | struct promise_expiry {
    class expiring_fifo (line 56) | class expiring_fifo {
      type entry (line 61) | struct entry {
        method entry (line 64) | entry(T&& payload_) : payload(std::move(payload_)) {}
        method entry (line 65) | entry(const T& payload_) : payload(payload_) {}
        method entry (line 66) | entry(T payload_, expiring_fifo& ef, time_point timeout)
        method entry (line 77) | entry(entry&& x) = delete;
        method entry (line 78) | entry(const entry& x) = delete;
      method drop_expired_front (line 93) | void drop_expired_front() noexcept {
      method expiring_fifo (line 102) | expiring_fifo() noexcept = default;
      method expiring_fifo (line 103) | expiring_fifo(OnExpiry on_expiry) noexcept(std::is_nothrow_move_cons...
      method expiring_fifo (line 105) | expiring_fifo(expiring_fifo&& o) noexcept
      method expiring_fifo (line 111) | expiring_fifo& operator=(expiring_fifo&& o) noexcept {
      method empty (line 124) | bool empty() const noexcept {
      method T (line 135) | T& front() noexcept {
      method T (line 144) | const T& front() const noexcept {
      method size (line 154) | size_t size() const noexcept {
      method reserve (line 162) | void reserve(size_t size) {
      method push_back (line 168) | void push_back(const T& payload) {
      method push_back (line 179) | void push_back(T&& payload) {
      method push_back (line 191) | void push_back(T&& payload, time_point timeout) {
      method pop_front (line 206) | void pop_front() noexcept {

FILE: include/seastar/core/fair_queue.hh
  type seastar (line 40) | namespace seastar {
    type testing (line 42) | namespace testing {
      class fair_queue_test (line 43) | class fair_queue_test
    class fair_queue_ticket (line 53) | class fair_queue_ticket {
      method fair_queue_ticket (line 62) | fair_queue_ticket() noexcept {}
    class fair_queue_entry (line 109) | class fair_queue_entry {
      method fair_queue_entry (line 122) | explicit fair_queue_entry(capacity_t c) noexcept
      method capacity_t (line 129) | capacity_t capacity() const noexcept { return _capacity; }
    class fair_queue (line 151) | class fair_queue {
      type config (line 157) | struct config {
      class priority_class_group_data (line 167) | class priority_class_group_data
        method priority_class_group_data (line 224) | priority_class_group_data(uint32_t shares, priority_class_group_da...
        method priority_class_group_data (line 231) | priority_class_group_data(const priority_class_group_data&) = delete;
        method priority_class_group_data (line 232) | priority_class_group_data(priority_class_group_data&&) = delete;
        method reserve (line 237) | void reserve() {
      class priority_entry (line 169) | class priority_entry {
        method priority_entry (line 182) | priority_entry(uint32_t shares, priority_class_group_data* p) noex...
        method update_shares (line 191) | void update_shares(uint32_t shares) noexcept {
      type class_compare (line 198) | struct class_compare {
      class priority_queue (line 202) | class priority_queue : public std::priority_queue<priority_entry_ptr...
        method reserve (line 205) | void reserve(size_t len) {
        method assert_enough_capacity (line 209) | void assert_enough_capacity() const noexcept {
      class priority_class_group_data (line 214) | class priority_class_group_data final : public priority_entry {
        method priority_class_group_data (line 224) | priority_class_group_data(uint32_t shares, priority_class_group_da...
        method priority_class_group_data (line 231) | priority_class_group_data(const priority_class_group_data&) = delete;
        method priority_class_group_data (line 232) | priority_class_group_data(priority_class_group_data&&) = delete;
        method reserve (line 237) | void reserve() {
      class priority_class_data (line 244) | class priority_class_data
      method fair_queue (line 265) | fair_queue(fair_queue&&) = delete;
      method sstring (line 268) | sstring label() const noexcept { return _config.label; }
      method fair_queue_ticket (line 286) | [[deprecated("Ticket resources are not accounted for any longer")]]
      method fair_queue_ticket (line 290) | [[deprecated("Ticket resources are not accounted for any longer")]]
      method capacity_t (line 312) | capacity_t queued_capacity() const noexcept { return _queued_capacit...
  type fmt::formatter<seastar::fair_queue_ticket> (line 322) | struct fmt::formatter<seastar::fair_queue_ticket> : fmt::ostream_formatt...

FILE: include/seastar/core/file-types.hh
  type seastar (line 28) | namespace seastar {
    type open_flags (line 37) | enum class open_flags {
    function open_flags (line 47) | inline constexpr open_flags operator|(open_flags a, open_flags b) {
    function open_flags (line 55) | inline constexpr open_flags operator&(open_flags a, open_flags b) {
    type directory_entry_type (line 72) | enum class directory_entry_type {
    type internal::linux_abi (line 83) | namespace internal::linux_abi {
      type linux_dirent64 (line 91) | struct linux_dirent64 {
    type fs_type (line 102) | enum class fs_type {
    type access_flags (line 114) | enum class access_flags {
    function access_flags (line 124) | inline constexpr access_flags operator|(access_flags a, access_flags b) {
    function access_flags (line 128) | inline constexpr access_flags operator&(access_flags a, access_flags b) {
    type file_permissions (line 133) | enum class file_permissions {
    function file_permissions (line 155) | inline constexpr file_permissions operator|(file_permissions a, file_p...
    function file_permissions (line 159) | inline constexpr file_permissions operator&(file_permissions a, file_p...

FILE: include/seastar/core/file.hh
  type seastar (line 49) | namespace seastar {
    type directory_entry (line 56) | struct directory_entry {
    type group_details (line 64) | struct group_details {
    type stat_data (line 72) | struct stat_data {
    type file_open_options (line 95) | struct file_open_options {
    class file (line 111) | class file
      method file (line 195) | file() noexcept : _file_impl(nullptr) {}
      method file (line 197) | file(shared_ptr<file_impl> impl) noexcept
      method file (line 213) | file(const file& x) = default;
      method file (line 215) | file(file&& x) noexcept : _file_impl(std::move(x._file_impl)) {}
      method file (line 220) | file& operator=(const file& x) noexcept = default;
      method file (line 222) | file& operator=(file&& x) noexcept = default;
      method disk_read_dma_alignment (line 233) | uint64_t disk_read_dma_alignment() const noexcept {
      method disk_write_dma_alignment (line 238) | uint64_t disk_write_dma_alignment() const noexcept {
      method disk_overwrite_dma_alignment (line 248) | uint64_t disk_overwrite_dma_alignment() const noexcept {
      method memory_dma_alignment (line 253) | uint64_t memory_dma_alignment() const noexcept {
      method disk_read_max_length (line 261) | size_t disk_read_max_length() const noexcept {
      method disk_write_max_length (line 269) | size_t disk_write_max_length() const noexcept {
      method dma_read (line 288) | future<size_t>
      method dma_read (line 309) | future<temporary_buffer<CharType>> dma_read(uint64_t pos, size_t len...
      class eof_error (line 317) | class eof_error : public std::exception {}
      method dma_read_exactly (line 332) | future<temporary_buffer<CharType>>
      method dma_read (line 351) | future<size_t> dma_read(uint64_t pos, std::vector<iovec> iov, io_int...
      method dma_write (line 366) | future<size_t> dma_write(uint64_t pos, const CharType* buffer, size_...
      method dma_write (line 382) | future<size_t> dma_write(uint64_t pos, std::vector<iovec> iov, io_in...
      type stat (line 393) | struct stat
      type stat (line 399) | struct stat
      method dma_read_bulk (line 544) | future<temporary_buffer<CharType>>
    class file_impl (line 112) | class file_impl
      type stat (line 153) | struct stat
      type stat (line 154) | struct stat
    class io_intent (line 113) | class io_intent
    class file_handle (line 114) | class file_handle
      method file_handle (line 647) | explicit file_handle(std::unique_ptr<file_handle_impl> impl) : _impl...
    class file_data_sink_impl (line 115) | class file_data_sink_impl
    class file_data_source_impl (line 116) | class file_data_source_impl
    class file_handle_impl (line 126) | class file_handle_impl {
    class file_impl (line 133) | class file_impl {
      type stat (line 153) | struct stat
      type stat (line 154) | struct stat
    type stat (line 169) | struct stat
    class file (line 182) | class file {
      method file (line 195) | file() noexcept : _file_impl(nullptr) {}
      method file (line 197) | file(shared_ptr<file_impl> impl) noexcept
      method file (line 213) | file(const file& x) = default;
      method file (line 215) | file(file&& x) noexcept : _file_impl(std::move(x._file_impl)) {}
      method file (line 220) | file& operator=(const file& x) noexcept = default;
      method file (line 222) | file& operator=(file&& x) noexcept = default;
      method disk_read_dma_alignment (line 233) | uint64_t disk_read_dma_alignment() const noexcept {
      method disk_write_dma_alignment (line 238) | uint64_t disk_write_dma_alignment() const noexcept {
      method disk_overwrite_dma_alignment (line 248) | uint64_t disk_overwrite_dma_alignment() const noexcept {
      method memory_dma_alignment (line 253) | uint64_t memory_dma_alignment() const noexcept {
      method disk_read_max_length (line 261) | size_t disk_read_max_length() const noexcept {
      method disk_write_max_length (line 269) | size_t disk_write_max_length() const noexcept {
      method dma_read (line 288) | future<size_t>
      method dma_read (line 309) | future<temporary_buffer<CharType>> dma_read(uint64_t pos, size_t len...
      class eof_error (line 317) | class eof_error : public std::exception {}
      method dma_read_exactly (line 332) | future<temporary_buffer<CharType>>
      method dma_read (line 351) | future<size_t> dma_read(uint64_t pos, std::vector<iovec> iov, io_int...
      method dma_write (line 366) | future<size_t> dma_write(uint64_t pos, const CharType* buffer, size_...
      method dma_write (line 382) | future<size_t> dma_write(uint64_t pos, std::vector<iovec> iov, io_in...
      type stat (line 393) | struct stat
      type stat (line 399) | struct stat
      method dma_read_bulk (line 544) | future<temporary_buffer<CharType>>
    function with_file (line 598) | futurize_t<std::invoke_result_t<Func, file&>> with_file(future<file> f...
    function with_file_close_on_failure (line 621) | futurize_t<std::invoke_result_t<Func, file&>> with_file_close_on_failu...
    class file_handle (line 644) | class file_handle {
      method file_handle (line 647) | explicit file_handle(std::unique_ptr<file_handle_impl> impl) : _impl...
    class cancelled_error (line 668) | class cancelled_error : public std::exception {

FILE: include/seastar/core/format.hh
  type seastar (line 27) | namespace seastar {
    function sstring (line 39) | sstring

FILE: include/seastar/core/fsnotify.hh
  type seastar::experimental (line 30) | namespace seastar::experimental {
    class fsnotifier (line 53) | class fsnotifier {
      class impl (line 54) | class impl
      class watch (line 57) | class watch
        method watch_token (line 124) | watch_token token() const {
      type flags (line 66) | enum class flags : uint32_t {
      class watch (line 106) | class watch {
        method watch_token (line 124) | watch_token token() const {
      type event (line 150) | struct event {

FILE: include/seastar/core/fsqual.hh
  type seastar (line 26) | namespace seastar {

FILE: include/seastar/core/fstream.hh
  type seastar (line 39) | namespace seastar {
    class file_input_stream_history (line 42) | class file_input_stream_history {
      type window (line 44) | struct window {
    type file_input_stream_options (line 56) | struct file_input_stream_options {
    type file_output_stream_options (line 98) | struct file_output_stream_options {

FILE: include/seastar/core/function_traits.hh
  type seastar (line 27) | namespace seastar {
    type function_traits (line 30) | struct function_traits
    type function_traits (line 74) | struct function_traits : public function_traits<decltype(&T::operator())>
    type function_traits<T&> (line 78) | struct function_traits<T&> : public function_traits<std::remove_refere...
    type function_traits<std::reference_wrapper<T>> (line 82) | struct function_traits<std::reference_wrapper<T>> : public function_tr...
  type function_traits<Ret(Args...)> (line 33) | struct function_traits<Ret(Args...)>
    type arg (line 42) | struct arg
  type function_traits<Ret(*)(Args...)> (line 50) | struct function_traits<Ret(*)(Args...)> : public function_traits<Ret(Arg...
  type function_traits<Ret(T::*)(Args...)> (line 54) | struct function_traits<Ret(T::*)(Args...)> : public function_traits<Ret(...
  type function_traits<Ret(T::*)(Args...) const> (line 58) | struct function_traits<Ret(T::*)(Args...) const> : public function_trait...
  type function_traits<Ret(*)(Args...) noexcept> (line 62) | struct function_traits<Ret(*)(Args...) noexcept> : public function_trait...
  type function_traits<Ret(T::*)(Args...) noexcept> (line 66) | struct function_traits<Ret(T::*)(Args...) noexcept> : public function_tr...
  type function_traits<Ret(T::*)(Args...) const noexcept> (line 70) | struct function_traits<Ret(T::*)(Args...) const noexcept> : public funct...

FILE: include/seastar/core/future.hh
  type seastar (line 46) | namespace seastar {
    type nested_exception (line 48) | struct nested_exception : public std::exception {
    class promise (line 149) | class promise
      method promise (line 931) | promise() noexcept : internal::promise_base_with_type<T>(&_local_sta...
      method promise (line 935) | promise(promise&& x) noexcept : internal::promise_base_with_type<T>(...
      method promise (line 938) | promise(const promise&) = delete;
      method promise (line 939) | promise& operator=(promise&& x) noexcept {
      method set_to_current_exception (line 952) | void set_to_current_exception() noexcept {
      method set_value (line 981) | void set_value(A&&... a) noexcept {
      method set_exception (line 991) | void set_exception(std::exception_ptr&& ex) noexcept {
      method set_exception (line 995) | void set_exception(const std::exception_ptr& ex) noexcept {
      method set_exception (line 1005) | void set_exception(Exception&& e) noexcept {
    class future (line 152) | class future
      method future (line 1232) | future(future_for_get_promise_marker) noexcept { }
      method future (line 1234) | future(promise<T>* pr) noexcept : future_base(pr, &_state), _state(s...
      method future (line 1236) | future(ready_future_marker m, A&&... a) noexcept : _state(m, std::fo...
      method future (line 1237) | future(future_state_base::current_exception_future_marker m) noexcep...
      method future (line 1238) | future(future_state_base::nested_exception_marker m, future_state_ba...
      method future (line 1239) | future(future_state_base::nested_exception_marker m, future_state_ba...
      method future (line 1240) | future(exception_future_marker m, std::exception_ptr&& ex) noexcept ...
      method future (line 1241) | future(exception_future_marker m, future_state_base&& state) noexcep...
      method future (line 1242) | [[gnu::always_inline]]
      method get_promise (line 1246) | internal::promise_base_with_type<T> get_promise() noexcept {
      method schedule (line 1253) | void schedule(continuation_base<T>* tws) noexcept {
      method schedule (line 1257) | void schedule(Pr&& pr, Func&& func, Wrapper&& wrapper, std::source_l...
      method future_state (line 1279) | [[gnu::always_inline]]
      method rethrow_with_nested (line 1287) | future<T> rethrow_with_nested(future_state_base&& n) noexcept {
      method rethrow_with_nested (line 1291) | future<T> rethrow_with_nested() noexcept {
      method future (line 1304) | [[gnu::always_inline]]
      method future (line 1306) | future(const future&) = delete;
      method future (line 1307) | future& operator=(future&& x) noexcept {
      method value_type (line 1323) | [[gnu::always_inline]]
      method get_exception (line 1329) | [[gnu::always_inline]]
      method wait (line 1341) | void wait() noexcept {
      method available (line 1351) | [[gnu::always_inline]]
      method failed (line 1359) | [[gnu::always_inline]]
      method Result (line 1387) | Result
      method Result (line 1431) | Result
      method Result (line 1447) | Result then_impl_nrvo(Func&& func, std::source_location sl) noexcept {
      method Result (line 1467) | Result
      method then_wrapped (line 1498) | futurize_t<FuncResult>
      method then_wrapped (line 1510) | futurize_t<FuncResult>
      method then_wrapped_maybe_erase (line 1524) | futurize_t<FuncResult>
      method then_wrapped_nrvo (line 1545) | futurize_t<FuncResult>
      method then_wrapped_common (line 1560) | futurize_t<FuncResult>
      method forward_to (line 1578) | void forward_to(internal::promise_base_with_type<T>&& pr) noexcept {
      method forward_to (line 1597) | void forward_to(promise<T>&& pr) noexcept {
      method finally (line 1629) | future<T> finally(Func&& func, std::source_location sl = std::source...
      type finally_body (line 1641) | struct finally_body
      type finally_body<Func, true> (line 1644) | struct finally_body<Func, true> {
        method finally_body (line 1647) | finally_body(Func&& func) noexcept : _func(std::forward<Func>(func))
      type finally_body<Func, false> (line 1664) | struct finally_body<Func, false> {
        method finally_body (line 1667) | finally_body(Func&& func) noexcept : _func(std::forward<Func>(func))
      method or_terminate (line 1684) | future<> or_terminate(std::source_location sl = std::source_location...
      method discard_result (line 1698) | future<> discard_result(std::source_location sl = std::source_locati...
      method handle_exception (line 1722) | future<T> handle_exception(Func&& func, std::source_location sl = st...
      method handle_exception_type (line 1750) | future<T> handle_exception_type(Func&& func, std::source_location sl...
      method ignore_ready_future (line 1775) | void ignore_ready_future() noexcept {
      method set_task (line 1782) | void set_task(task& t) noexcept {
      method set_callback (line 1787) | void set_callback(continuation_base<T>* callback) noexcept {
    class shared_future (line 155) | class shared_future
    type future_state_base (line 157) | struct future_state_base
      type state (line 410) | enum class state : uintptr_t {
      method any (line 425) | any() noexcept { st = state::future; }
      method any (line 426) | any(state s) noexcept { st = s; }
      method set_exception (line 427) | void set_exception(std::exception_ptr&& e) noexcept {
      method any (line 431) | any(std::exception_ptr&& e) noexcept {
      method valid (line 435) | bool valid() const noexcept { return st != state::invalid && st != s...
      method available (line 436) | bool available() const noexcept { return st == state::result || st >...
      method failed (line 437) | bool failed() const noexcept { return __builtin_expect(st >= state::...
      method take_exception (line 440) | std::exception_ptr take_exception() noexcept {
      method move_it (line 454) | void move_it(any&& x) noexcept {
      method any (line 474) | any(any&& x) noexcept {
      method any (line 477) | any& operator=(any&& x) noexcept {
      method has_result (line 485) | bool has_result() const noexcept {
      method future_state_base (line 492) | future_state_base() noexcept = default;
      method future_state_base (line 493) | future_state_base(state st) noexcept : _u(st) { }
      method future_state_base (line 494) | future_state_base(std::exception_ptr&& ex) noexcept : _u(std::move(e...
      method future_state_base (line 495) | future_state_base(future_state_base&& x) noexcept : _u(std::move(x._...
      type current_exception_future_marker (line 500) | struct current_exception_future_marker {}
      type nested_exception_marker (line 502) | struct nested_exception_marker {}
      method valid (line 512) | bool valid() const noexcept { return _u.valid(); }
      method available (line 513) | bool available() const noexcept { return _u.available(); }
      method failed (line 514) | bool failed() const noexcept { return _u.failed(); }
      method set_exception (line 518) | void set_exception(std::exception_ptr&& ex) noexcept {
      method future_state_base (line 522) | future_state_base& operator=(future_state_base&& x) noexcept = default;
      method set_exception (line 523) | void set_exception(future_state_base&& state) noexcept {
      method get_exception (line 527) | std::exception_ptr get_exception() && noexcept {
    function as_ready_future (line 171) | inline
    function make_exception_future (line 190) | future<T> make_exception_future(const std::exception_ptr& ex) noexcept {
    function make_exception_future (line 195) | future<T> make_exception_future(std::exception_ptr& ex) noexcept {
    function make_exception_future (line 200) | future<T> make_exception_future(const std::exception_ptr&& ex) noexcept {
    type broken_promise (line 215) | struct broken_promise : std::logic_error {
    type internal (line 230) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
    function func_to_rvalue (line 369) | static constexpr auto func_to_rvalue(Func&& func) {
    type future_state_base (line 408) | struct future_state_base {
      type state (line 410) | enum class state : uintptr_t {
      method any (line 425) | any() noexcept { st = state::future; }
      method any (line 426) | any(state s) noexcept { st = s; }
      method set_exception (line 427) | void set_exception(std::exception_ptr&& e) noexcept {
      method any (line 431) | any(std::exception_ptr&& e) noexcept {
      method valid (line 435) | bool valid() const noexcept { return st != state::invalid && st != s...
      method available (line 436) | bool available() const noexcept { return st == state::result || st >...
      method failed (line 437) | bool failed() const noexcept { return __builtin_expect(st >= state::...
      method take_exception (line 440) | std::exception_ptr take_exception() noexcept {
      method move_it (line 454) | void move_it(any&& x) noexcept {
      method any (line 474) | any(any&& x) noexcept {
      method any (line 477) | any& operator=(any&& x) noexcept {
      method has_result (line 485) | bool has_result() const noexcept {
      method future_state_base (line 492) | future_state_base() noexcept = default;
      method future_state_base (line 493) | future_state_base(state st) noexcept : _u(st) { }
      method future_state_base (line 494) | future_state_base(std::exception_ptr&& ex) noexcept : _u(std::move(e...
      method future_state_base (line 495) | future_state_base(future_state_base&& x) noexcept : _u(std::move(x._...
      type current_exception_future_marker (line 500) | struct current_exception_future_marker {}
      type nested_exception_marker (line 502) | struct nested_exception_marker {}
      method valid (line 512) | bool valid() const noexcept { return _u.valid(); }
      method available (line 513) | bool available() const noexcept { return _u.available(); }
      method failed (line 514) | bool failed() const noexcept { return _u.failed(); }
      method set_exception (line 518) | void set_exception(std::exception_ptr&& ex) noexcept {
      method future_state_base (line 522) | future_state_base& operator=(future_state_base&& x) noexcept = default;
      method set_exception (line 523) | void set_exception(future_state_base&& state) noexcept {
      method get_exception (line 527) | std::exception_ptr get_exception() && noexcept {
    type internal (line 546) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
    type ready_future_marker (line 559) | struct ready_future_marker {}
    type exception_future_marker (line 560) | struct exception_future_marker {}
    type future_for_get_promise_marker (line 561) | struct future_for_get_promise_marker {}
    type future_state (line 565) | struct future_state :  public future_state_base, private internal::uni...
      method future_state (line 572) | future_state() noexcept = default;
      method move_it (line 573) | void move_it(future_state&& x) noexcept {
      method future_state (line 591) | [[gnu::always_inline]]
      method clear (line 596) | void clear() noexcept {
      method future_state (line 607) | future_state& operator=(future_state&& x) noexcept {
      method future_state (line 616) | future_state(ready_future_marker, A&&... a) noexcept : future_state_...
      method set (line 624) | void set(A&&... a) noexcept {
      method future_state (line 628) | future_state(exception_future_marker, std::exception_ptr&& ex) noexc...
      method future_state (line 629) | future_state(exception_future_marker, future_state_base&& state) noe...
      method future_state (line 630) | future_state(current_exception_future_marker m) noexcept : future_st...
      method future_state (line 631) | future_state(nested_exception_marker m, future_state_base&& old) noe...
      method future_state (line 632) | future_state(nested_exception_marker m, future_state_base&& n, futur...
      method T (line 633) | T&& get_value() && noexcept {
      method T (line 637) | T&& take_value() && noexcept {
      method U (line 643) | const U& get_value() const& noexcept(copy_noexcept) {
      method T (line 647) | T&& take() && {
      method T (line 655) | T&& get() && {
      method T (line 662) | const T& get() const& {
      method get0_return_type (line 670) | static get0_return_type get0(T&& x) {
      method get0_return_type (line 674) | get0_return_type get0() {
    class continuation_base (line 680) | class continuation_base : public task {
      method continuation_base (line 687) | continuation_base() noexcept = default;
      method set_state (line 688) | void set_state(future_state&& state) noexcept {
      method task (line 695) | virtual task* waiting_task() noexcept override { return nullptr; }
    type continuation_base_from_future (line 703) | struct continuation_base_from_future
    class continuation_base_with_promise (line 714) | class continuation_base_with_promise : public continuation_base<T> {
      method continuation_base_with_promise (line 717) | continuation_base_with_promise(Promise&& pr) noexcept : _pr(std::mov...
    type continuation (line 725) | struct continuation final : continuation_base_with_promise<Promise, T> {
      method continuation (line 736) | continuation(Promise&& pr, Func&& func, Wrapper&& wrapper) noexcept
      method run_and_dispose (line 740) | virtual void run_and_dispose() noexcept override {
    type internal (line 752) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
    class promise (line 923) | class promise : private internal::promise_base_with_type<T> {
      method promise (line 931) | promise() noexcept : internal::promise_base_with_type<T>(&_local_sta...
      method promise (line 935) | promise(promise&& x) noexcept : internal::promise_base_with_type<T>(...
      method promise (line 938) | promise(const promise&) = delete;
      method promise (line 939) | promise& operator=(promise&& x) noexcept {
      method set_to_current_exception (line 952) | void set_to_current_exception() noexcept {
      method set_value (line 981) | void set_value(A&&... a) noexcept {
      method set_exception (line 991) | void set_exception(std::exception_ptr&& ex) noexcept {
      method set_exception (line 995) | void set_exception(const std::exception_ptr& ex) noexcept {
      method set_exception (line 1005) | void set_exception(Exception&& e) noexcept {
    type is_future (line 1026) | struct is_future : std::false_type {}
    type futurize (line 1039) | struct futurize
      method type (line 1884) | static inline type invoke(Func&& func, internal::monostate) noexcept {
      method type (line 1888) | static type current_exception_as_future() noexcept {
      method type (line 1893) | static type from_tuple(tuple_type&& value) {
      method type (line 1897) | static type from_tuple(const tuple_type& value) {
      method type (line 1902) | static type from_tuple(value_type&& value) {
      method type (line 1906) | static type from_tuple(const value_type& value) {
    type internal (line 1073) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
    function task (line 1176) | task* continuation_base_with_promise<Promise, T>::waiting_task() noexc...
    class future (line 1220) | class [[nodiscard]] future : private internal::future_base {
      method future (line 1232) | future(future_for_get_promise_marker) noexcept { }
      method future (line 1234) | future(promise<T>* pr) noexcept : future_base(pr, &_state), _state(s...
      method future (line 1236) | future(ready_future_marker m, A&&... a) noexcept : _state(m, std::fo...
      method future (line 1237) | future(future_state_base::current_exception_future_marker m) noexcep...
      method future (line 1238) | future(future_state_base::nested_exception_marker m, future_state_ba...
      method future (line 1239) | future(future_state_base::nested_exception_marker m, future_state_ba...
      method future (line 1240) | future(exception_future_marker m, std::exception_ptr&& ex) noexcept ...
      method future (line 1241) | future(exception_future_marker m, future_state_base&& state) noexcep...
      method future (line 1242) | [[gnu::always_inline]]
      method get_promise (line 1246) | internal::promise_base_with_type<T> get_promise() noexcept {
      method schedule (line 1253) | void schedule(continuation_base<T>* tws) noexcept {
      method schedule (line 1257) | void schedule(Pr&& pr, Func&& func, Wrapper&& wrapper, std::source_l...
      method future_state (line 1279) | [[gnu::always_inline]]
      method rethrow_with_nested (line 1287) | future<T> rethrow_with_nested(future_state_base&& n) noexcept {
      method rethrow_with_nested (line 1291) | future<T> rethrow_with_nested() noexcept {
      method future (line 1304) | [[gnu::always_inline]]
      method future (line 1306) | future(const future&) = delete;
      method future (line 1307) | future& operator=(future&& x) noexcept {
      method value_type (line 1323) | [[gnu::always_inline]]
      method get_exception (line 1329) | [[gnu::always_inline]]
      method wait (line 1341) | void wait() noexcept {
      method available (line 1351) | [[gnu::always_inline]]
      method failed (line 1359) | [[gnu::always_inline]]
      method Result (line 1387) | Result
      method Result (line 1431) | Result
      method Result (line 1447) | Result then_impl_nrvo(Func&& func, std::source_location sl) noexcept {
      method Result (line 1467) | Result
      method then_wrapped (line 1498) | futurize_t<FuncResult>
      method then_wrapped (line 1510) | futurize_t<FuncResult>
      method then_wrapped_maybe_erase (line 1524) | futurize_t<FuncResult>
      method then_wrapped_nrvo (line 1545) | futurize_t<FuncResult>
      method then_wrapped_common (line 1560) | futurize_t<FuncResult>
      method forward_to (line 1578) | void forward_to(internal::promise_base_with_type<T>&& pr) noexcept {
      method forward_to (line 1597) | void forward_to(promise<T>&& pr) noexcept {
      method finally (line 1629) | future<T> finally(Func&& func, std::source_location sl = std::source...
      type finally_body (line 1641) | struct finally_body
      type finally_body<Func, true> (line 1644) | struct finally_body<Func, true> {
        method finally_body (line 1647) | finally_body(Func&& func) noexcept : _func(std::forward<Func>(func))
      type finally_body<Func, false> (line 1664) | struct finally_body<Func, false> {
        method finally_body (line 1667) | finally_body(Func&& func) noexcept : _func(std::forward<Func>(func))
      method or_terminate (line 1684) | future<> or_terminate(std::source_location sl = std::source_location...
      method discard_result (line 1698) | future<> discard_result(std::source_location sl = std::source_locati...
      method handle_exception (line 1722) | future<T> handle_exception(Func&& func, std::source_location sl = st...
      method handle_exception_type (line 1750) | future<T> handle_exception_type(Func&& func, std::source_location sl...
      method ignore_ready_future (line 1775) | void ignore_ready_future() noexcept {
      method set_task (line 1782) | void set_task(task& t) noexcept {
      method set_callback (line 1787) | void set_callback(continuation_base<T>* callback) noexcept {
    type internal (line 1823) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
    type futurize (line 1862) | struct futurize : public internal::futurize_base<T> {
      method type (line 1884) | static inline type invoke(Func&& func, internal::monostate) noexcept {
      method type (line 1888) | static type current_exception_as_future() noexcept {
      method type (line 1893) | static type from_tuple(tuple_type&& value) {
      method type (line 1897) | static type from_tuple(const tuple_type& value) {
      method type (line 1902) | static type from_tuple(value_type&& value) {
      method type (line 1906) | static type from_tuple(const value_type& value) {
    function make_ready_future (line 1943) | inline
    function make_exception_future (line 1949) | inline
    function current_exception_as_future (line 1961) | future<T> current_exception_as_future() noexcept {
    function make_exception_future (line 1974) | inline
    function make_exception_future_with_backtrace (line 1981) | future<T> make_exception_future_with_backtrace(Exception&& ex) noexcept {
    function futurize_invoke (line 2059) | auto futurize_invoke(Func&& func, Args&&... args) noexcept {
    function futurize_apply (line 2065) | auto futurize_apply(Func&& func, std::tuple<Args...>&& args) noexcept {
    type internal (line 2070) | namespace internal {
      class promise_base_with_type (line 232) | class promise_base_with_type
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class promise_base (line 233) | class promise_base
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      type monostate (line 235) | struct monostate {}
      type future_stored_type (line 238) | struct future_stored_type
      type future_stored_type<> (line 241) | struct future_stored_type<> {
      type future_stored_type<T> (line 246) | struct future_stored_type<T> {
      type get0_return_type (line 259) | struct get0_return_type
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type get0_return_type<internal::monostate> (line 262) | struct get0_return_type<internal::monostate> {
        method type (line 264) | static type get0(internal::monostate) { }
      type get0_return_type (line 268) | struct get0_return_type {
        method T (line 270) | static T get0(T&& v) { return std::move(v); }
      type uninitialized_wrapper (line 282) | struct uninitialized_wrapper {
        method any (line 285) | any() noexcept {}
        method uninitialized_wrapper (line 292) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 295) | void
        method uninitialized_set (line 299) | void uninitialized_set(tuple_type&& v) {
        method uninitialized_set (line 302) | void uninitialized_set(const tuple_type& v) {
      type uninitialized_wrapper<internal::monostate> (line 314) | struct uninitialized_wrapper<internal::monostate> {
        method uninitialized_wrapper (line 317) | uninitialized_wrapper() noexcept = default;
        method uninitialized_set (line 318) | void uninitialized_set() {
        method uninitialized_set (line 320) | void uninitialized_set(internal::monostate) {
        method uninitialized_set (line 322) | void uninitialized_set(std::tuple<>&& v) {
        method uninitialized_set (line 324) | void uninitialized_set(const std::tuple<>& v) {
      type is_trivially_move_constructible_and_destructible (line 335) | struct is_trivially_move_constructible_and_destructible {
      type all_true (line 340) | struct all_true : std::false_type {}
      type all_true<> (line 343) | struct all_true<> : std::true_type {}
      type is_tuple_effectively_trivially_move_constructible_and_destructible_helper (line 349) | struct is_tuple_effectively_trivially_move_constructible_and_destruc...
      class future_base (line 760) | class future_base
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      class promise_base (line 762) | class promise_base {
        type urgent (line 764) | enum class urgent { no, yes }
        method set_task (line 776) | void set_task(task* task) noexcept {
        method set_task (line 782) | void set_task(task* task) noexcept {
        method assert_task_shard (line 785) | void assert_task_shard() const noexcept { }
        method promise_base (line 788) | promise_base(const promise_base&) = delete;
        method promise_base (line 789) | promise_base(future_state_base* state) noexcept : _state(state) {}
        method set_exception_impl (line 809) | void set_exception_impl(T&& val) noexcept {
        method set_exception (line 825) | void set_exception(future_state_base&& state) noexcept {
        method set_exception (line 829) | void set_exception(std::exception_ptr&& ex) noexcept {
        method set_exception (line 833) | void set_exception(const std::exception_ptr& ex) noexcept {
        method set_exception (line 839) | void set_exception(Exception&& e) noexcept {
        method task (line 854) | task* waiting_task() const noexcept { return _task; }
      class promise_base_with_type (line 864) | class promise_base_with_type : protected internal::promise_base {
        method future_state (line 867) | future_state* get_state() noexcept {
        method promise_base_with_type (line 872) | promise_base_with_type(future_state_base* state) noexcept : promis...
        method promise_base_with_type (line 873) | promise_base_with_type(future<T>* future) noexcept : promise_base(...
        method promise_base_with_type (line 874) | promise_base_with_type(promise_base_with_type&& x) noexcept = defa...
        method promise_base_with_type (line 875) | promise_base_with_type(const promise_base_with_type&) = delete;
        method promise_base_with_type (line 876) | promise_base_with_type& operator=(promise_base_with_type&& x) noex...
        method set_urgent_state (line 879) | void set_urgent_state(future_state&& state) noexcept {
        method set_value (line 891) | void set_value(A&&... a) noexcept {
        method set_to_current_exception (line 902) | void set_to_current_exception() noexcept {
      class future_base (line 1074) | class future_base {
        method future_base (line 1077) | future_base() noexcept : _promise(nullptr) {}
        method future_base (line 1078) | future_base(promise_base* promise, future_state_base* state) noexc...
        method move_it (line 1083) | void move_it(future_base&& x, future_state_base* state) noexcept {
        method future_base (line 1092) | future_base(future_base&& x, future_state_base* state) noexcept {
        method clear (line 1096) | void clear() noexcept {
        method promise_base (line 1106) | promise_base* detach_promise() noexcept {
        method schedule (line 1112) | void schedule(task* tws, future_state_base* state) noexcept {
      type future_result (line 1126) | struct future_result  {
      type future_result<Func, void> (line 1133) | struct future_result<Func, void> {
      function future_invoke (line 1143) | auto future_invoke(Func&& func, T&& v) {
      type result_of_apply (line 1152) | struct result_of_apply {
      type futurize_base (line 1825) | struct futurize_base {
        method type (line 1833) | static inline type convert(T&& value) { return make_ready_future<T...
        method type (line 1834) | static inline type convert(type&& value) { return std::move(value); }
      type futurize_base<void> (line 1842) | struct futurize_base<void> {
        method type (line 1847) | static inline type convert(type&& value) {
      type futurize_base<future<T>> (line 1855) | struct futurize_base<future<T>> : public futurize_base<T> {}
      type futurize_base<future<>> (line 1858) | struct futurize_base<future<>> : public futurize_base<void> {}
      function set_callback (line 2073) | inline
  type all_true<true, v...> (line 346) | struct all_true<true, v...> : public all_true<v...> {}
  type is_tuple_effectively_trivially_move_constructible_and_destructible_helper<std::tuple<T...>> (line 352) | struct is_tuple_effectively_trivially_move_constructible_and_destructibl...
  type continuation_base_from_future<future<T...>> (line 706) | struct continuation_base_from_future<future<T...>> {
  type is_future<future<T...>> (line 1030) | struct is_future<future<T...>> : std::true_type {}
  type result_of_apply<Func, std::tuple<T...>> (line 1157) | struct result_of_apply<Func, std::tuple<T...>> : std::invoke_result<Func...

FILE: include/seastar/core/gate.hh
  type seastar (line 38) | namespace seastar {
    class gate_closed_exception (line 45) | class gate_closed_exception : public std::exception {
    class named_gate_closed_exception (line 54) | class named_gate_closed_exception : public gate_closed_exception {
      method named_gate_closed_exception (line 58) | named_gate_closed_exception(const sstring& name) noexcept : gate_clo...
    class gate (line 77) | class gate {
      method assert_not_held_when_moved (line 85) | void assert_not_held_when_moved() const noexcept {}
      method assert_not_held_when_destroyed (line 86) | void assert_not_held_when_destroyed() const noexcept {}
      method gate (line 91) | gate() noexcept {}
      method gate (line 92) | gate(const gate&) = delete;
      method gate (line 93) | gate(gate&& x) noexcept
      method gate (line 97) | gate& operator=(gate&& x) noexcept {
      method try_enter (line 114) | bool try_enter() noexcept {
      method enter (line 125) | void enter() {
      method leave (line 134) | void leave() noexcept {
      method check (line 149) | void check() const {
      method close (line 159) | future<> close() noexcept {
      method get_count (line 169) | size_t get_count() const noexcept {
      method is_closed (line 174) | bool is_closed() const noexcept {
      class holder (line 187) | class holder {
        method debug_hold_gate (line 193) | void debug_hold_gate() noexcept {
        method debug_release_gate (line 199) | void debug_release_gate() noexcept {
        method debug_hold_gate (line 203) | void debug_hold_gate() noexcept {}
        method debug_release_gate (line 204) | void debug_release_gate() noexcept {}
        method gate (line 209) | gate* release_gate() noexcept {
        method holder (line 221) | holder() noexcept : _g(nullptr) { }
        method holder (line 225) | explicit holder(gate& g) : _g(&g) {
        method holder (line 235) | holder(const holder& x) noexcept : _g(x._g) {
        method holder (line 245) | holder(holder&& x) noexcept : _g(std::move(x).release_gate()) {
        method holder (line 260) | holder& operator=(const holder& x) noexcept {
        method holder (line 276) | holder& operator=(holder&& x) noexcept {
        method release (line 286) | void release() noexcept {
      method holder (line 295) | holder hold() {
        method debug_hold_gate (line 193) | void debug_hold_gate() noexcept {
        method debug_release_gate (line 199) | void debug_release_gate() noexcept {
        method debug_hold_gate (line 203) | void debug_hold_gate() noexcept {}
        method debug_release_gate (line 204) | void debug_release_gate() noexcept {}
        method gate (line 209) | gate* release_gate() noexcept {
        method holder (line 221) | holder() noexcept : _g(nullptr) { }
        method holder (line 225) | explicit holder(gate& g) : _g(&g) {
        method holder (line 235) | holder(const holder& x) noexcept : _g(x._g) {
        method holder (line 245) | holder(holder&& x) noexcept : _g(std::move(x).release_gate()) {
        method holder (line 260) | holder& operator=(const holder& x) noexcept {
        method holder (line 276) | holder& operator=(holder&& x) noexcept {
        method release (line 286) | void release() noexcept {
      method try_hold (line 302) | std::optional<holder> try_hold() noexcept {
      method make_closed_exception (line 307) | virtual std::exception_ptr make_closed_exception() const {
      method throw_closed_exception (line 322) | [[noreturn]] void throw_closed_exception() const {
    class named_gate (line 336) | class named_gate : public gate {
      method named_gate (line 340) | named_gate() = default;
      method named_gate (line 341) | explicit named_gate(sstring name) noexcept
      method named_gate (line 345) | named_gate(named_gate&&) = default;
      method named_gate (line 346) | named_gate& operator=(named_gate&&) = default;
      method make_closed_exception (line 349) | virtual std::exception_ptr make_closed_exception() const override {
    type internal (line 354) | namespace internal {
      function invoke_func_with_gate (line 357) | inline
    function with_gate (line 374) | inline
    function try_with_gate (line 392) | inline

FILE: include/seastar/core/idle_cpu_handler.hh
  type seastar (line 28) | namespace seastar {
    type idle_cpu_handler_result (line 33) | enum class idle_cpu_handler_result {

FILE: include/seastar/core/internal/api-level.hh
  type seastar (line 36) | namespace seastar {
    function SEASTAR_INCLUDE_API_V8 (line 37) | SEASTAR_INCLUDE_API_V8 namespace api_v8 {

FILE: include/seastar/core/internal/buffer_allocator.hh
  type seastar (line 24) | namespace seastar {
    class temporary_buffer (line 27) | class temporary_buffer
    type internal (line 29) | namespace internal {
      class buffer_allocator (line 34) | class buffer_allocator {

FILE: include/seastar/core/internal/current_task.hh
  type seastar::internal (line 24) | namespace seastar::internal {

FILE: include/seastar/core/internal/estimated_histogram.hh
  type seastar::metrics::internal (line 34) | namespace seastar::metrics::internal {
    class approximate_exponential_histogram (line 124) | class approximate_exponential_histogram {
      method approximate_exponential_histogram (line 133) | approximate_exponential_histogram() {
      method get_bucket_lower_limit (line 142) | uint64_t get_bucket_lower_limit(uint16_t bucket_id) const {
      method get_bucket_upper_limit (line
Condensed preview — 660 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,619K chars).
[
  {
    "path": ".clangd",
    "chars": 107,
    "preview": "Style:\n  AngledHeaders:\n    # public headers (under include/seastar) use angle brackets\n    - \"seastar/.*\"\n"
  },
  {
    "path": ".claude/CLAUDE.md",
    "chars": 3494,
    "preview": "# Seastar Project Instructions\n\n## Building\n\nThe project uses CMake with ninja as the build system. Build directories ar"
  },
  {
    "path": ".dockerignore",
    "chars": 11,
    "preview": ".git\nbuild\n"
  },
  {
    "path": ".gitattributes",
    "chars": 28,
    "preview": "*.cc diff=cpp\n*.hh diff=cpp\n"
  },
  {
    "path": ".github/workflows/alpinelinux.yaml",
    "chars": 1645,
    "preview": "name: Alpine Linux\n\non:\n  pull_request:\n  workflow_dispatch:  # Allows manual triggering\n\nconcurrency:\n  group: ${{ gith"
  },
  {
    "path": ".github/workflows/docker.yaml",
    "chars": 836,
    "preview": "name: Verify Dockerfile Build\n\non:\n  pull_request:\n    paths:\n      - 'docker/dev/Dockerfile'\n      - 'install-dependenc"
  },
  {
    "path": ".github/workflows/pre-commit.yaml",
    "chars": 459,
    "preview": "name: Pre-commit\n\non: [push, pull_request]\n\njobs:\n  pre-commit:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: acti"
  },
  {
    "path": ".github/workflows/python-lint.yaml",
    "chars": 420,
    "preview": "name: Python format\n\non: [push, pull_request]\n\njobs:\n  python-format:\n    name: Enforce python format\n    runs-on: ubunt"
  },
  {
    "path": ".github/workflows/test.yaml",
    "chars": 3596,
    "preview": "name: Test\n\npermissions:\n  contents: read\n\non:\n  workflow_call:\n    inputs:\n      compiler:\n        description: 'the C+"
  },
  {
    "path": ".github/workflows/tests.yaml",
    "chars": 1497,
    "preview": "name: Test\n\npermissions:\n  contents: read\n\non:\n  push:\n  pull_request:\n  workflow_dispatch:  # Allows manual triggering\n"
  },
  {
    "path": ".gitignore",
    "chars": 156,
    "preview": ".cooking_memory\n.cproject\n.project\n.settings\nbuild*\nbuild.ninja\ncscope.*\n__pycache__/\ncmake/Cooking.cmake\ntags\n.idea/\n.v"
  },
  {
    "path": ".gitmodules",
    "chars": 47,
    "preview": "[submodule \"dpdk\"]\n\tpath = dpdk\n\turl = ../dpdk\n"
  },
  {
    "path": ".gitorderfile",
    "chars": 22,
    "preview": "*.py\n*.hh\n*.rl\n*.cc\n*\n"
  },
  {
    "path": ".mailmap",
    "chars": 303,
    "preview": "Avi Kivity <avi@scylladb.com> Avi Kivity' via seastar-dev <seastar-dev@googlegroups.com>\nRaphael S. Carvalho <raphaelsc@"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 123,
    "preview": "repos:\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v5.0.0\n    hooks:\n      - id: trailing-whitespa"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 44423,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 727,
    "preview": "# Contributing Code to Seastar\n\nThere are two ways to contribute code to Seastar:\n* send your changes as [patches](https"
  },
  {
    "path": "HACKING.md",
    "chars": 4744,
    "preview": "# Developing and using Seastar\n\n## Configuring the project\n\nThere are multiple ways to configure Seastar and its depende"
  },
  {
    "path": "LICENSE",
    "chars": 10174,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "NOTICE",
    "chars": 460,
    "preview": "Seastar Framework\nCopyright 2015 Cloudius Systems\n\nThis works contains software from the OSv project (http://osv.io), li"
  },
  {
    "path": "README-DPDK.md",
    "chars": 1325,
    "preview": "Seastar and DPDK\n================\n\nSeastar uses the Data Plane Development Kit to drive NIC hardware directly.  This\npro"
  },
  {
    "path": "README.md",
    "chars": 8349,
    "preview": "Seastar\n=======\n\n[![Test](https://github.com/scylladb/seastar/actions/workflows/tests.yaml/badge.svg)](https://github.co"
  },
  {
    "path": "apps/CMakeLists.txt",
    "chars": 1531,
    "preview": "# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "apps/httpd/CMakeLists.txt",
    "chars": 1134,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/httpd/demo.json",
    "chars": 2445,
    "preview": "{\n    \"apiVersion\": \"0.0.1\",\n    \"swaggerVersion\": \"1.2\",\n    \"basePath\": \"{{Protocol}}://{{Host}}\",\n    \"resourcePath\":"
  },
  {
    "path": "apps/httpd/main.cc",
    "chars": 6734,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/io_tester/CMakeLists.txt",
    "chars": 989,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/io_tester/conf.yaml",
    "chars": 559,
    "preview": "- name: big_writes\n  shards: all\n  type: overwrite\n  shard_info:\n    parallelism: 10\n    reqsize: 256kB\n    shares: 10\n "
  },
  {
    "path": "apps/io_tester/io_tester.cc",
    "chars": 52831,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/io_tester/ioinfo.cc",
    "chars": 5381,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/io_tester/sched.yaml",
    "chars": 176,
    "preview": "- name: statement\n  shares: 1000\n\n- name: maintenance\n  shares: 100\n\n- name: compaction\n  shares: 200\n  parent: maintena"
  },
  {
    "path": "apps/iotune/CMakeLists.txt",
    "chars": 873,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/iotune/iotune.cc",
    "chars": 48769,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/lib/stop_signal.hh",
    "chars": 2221,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/memcached/CMakeLists.txt",
    "chars": 1387,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/memcached/ascii.rl",
    "chars": 4840,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/memcached/memcache.cc",
    "chars": 57849,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/memcached/memcached.hh",
    "chars": 1773,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/memcached/tests/CMakeLists.txt",
    "chars": 2400,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/memcached/tests/test.py",
    "chars": 1662,
    "preview": "#!/usr/bin/env python3\n#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, V"
  },
  {
    "path": "apps/memcached/tests/test_ascii_parser.cc",
    "chars": 13693,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/memcached/tests/test_memcached.py",
    "chars": 22599,
    "preview": "#!/usr/bin/env python3\n#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, V"
  },
  {
    "path": "apps/rpc_tester/CMakeLists.txt",
    "chars": 881,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/rpc_tester/rpc_tester.cc",
    "chars": 34784,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "apps/rpc_tester/sample-conf.yaml",
    "chars": 1346,
    "preview": "client:\n  nodelay: # bool, whether or not to set tcp_nodelay option\nserver:\n  nodelay: # bool, whether or not to set tcp"
  },
  {
    "path": "apps/seawreck/CMakeLists.txt",
    "chars": 808,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "apps/seawreck/seawreck.cc",
    "chars": 9209,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "cmake/CheckGcc107852.cmake",
    "chars": 666,
    "preview": "include (CheckCXXSourceCompiles)\ninclude (CMakePushCheckState)\n\ncmake_push_check_state (RESET)\n\n# these options are incl"
  },
  {
    "path": "cmake/CheckHeaders.cmake",
    "chars": 4703,
    "preview": "# seastar_check_self_contained() checks if the headers listed as the source of\n# a target are self-contained.\n#\n# Header"
  },
  {
    "path": "cmake/CheckIncludeStyle.cmake",
    "chars": 749,
    "preview": "# seastar_check_include_style() enforces that all source and header files under\n# specified directories include the head"
  },
  {
    "path": "cmake/CheckLibc.cmake",
    "chars": 1293,
    "preview": "# check for the bits in different standard C library implementations we\n# care about\n\ninclude (CheckCXXSourceCompiles)\nf"
  },
  {
    "path": "cmake/CheckP2582R1.cmake",
    "chars": 562,
    "preview": "include (CheckCXXSourceCompiles)\ninclude (CMakePushCheckState)\n\ncmake_push_check_state (RESET)\n\nset (CMAKE_REQUIRED_FLAG"
  },
  {
    "path": "cmake/CxxModulesRules.cmake",
    "chars": 1031,
    "preview": "if (CMAKE_CXX_COMPILER_ID STREQUAL \"Clang\")\n  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)\n    message (FATAL_ERROR \""
  },
  {
    "path": "cmake/FindGnuTLS.cmake",
    "chars": 1684,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindLibUring.cmake",
    "chars": 2027,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindLinuxMembarrier.cmake",
    "chars": 1430,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindPthreadSetName.cmake",
    "chars": 406,
    "preview": "include (CheckSymbolExists)\ninclude (CMakePushCheckState)\n\ncmake_push_check_state (RESET)\nset (CMAKE_REQUIRED_FLAGS \"-pt"
  },
  {
    "path": "cmake/FindSanitizers.cmake",
    "chars": 3372,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindStdAtomic.cmake",
    "chars": 1576,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindSystemTap-SDT.cmake",
    "chars": 1210,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/FindValgrind.cmake",
    "chars": 1483,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findc-ares.cmake",
    "chars": 2143,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Finddpdk.cmake",
    "chars": 6516,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findhwloc.cmake",
    "chars": 1712,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findlksctp-tools.cmake",
    "chars": 1608,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findlz4.cmake",
    "chars": 1643,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findragel.cmake",
    "chars": 1440,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findrt.cmake",
    "chars": 1581,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Finducontext.cmake",
    "chars": 1627,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/Findyaml-cpp.cmake",
    "chars": 2469,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/SeastarConfig.cmake.in",
    "chars": 2263,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/SeastarDependencies.cmake",
    "chars": 4510,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "cmake/TriStateOption.cmake",
    "chars": 1285,
    "preview": "# the \"option()\" defined by CMake represents a boolean. but somtimes, we want\n# to enable/disable it depending on the CM"
  },
  {
    "path": "cmake/check-seastar-include-style.py",
    "chars": 1659,
    "preview": "#!/usr/bin/env python3\n#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, V"
  },
  {
    "path": "cmake/code_tests/LinuxMembarrier_test.cc",
    "chars": 164,
    "preview": "extern \"C\" {\n#include <linux/membarrier.h>\n}\n\nint main() {\n    int x = MEMBARRIER_CMD_PRIVATE_EXPEDITED | MEMBARRIER_CMD"
  },
  {
    "path": "cmake/code_tests/Sanitizers_fiber_test.cc",
    "chars": 314,
    "preview": "#include <cstddef>\n\nextern \"C\" {\n    void __sanitizer_start_switch_fiber(void**, const void*, size_t);\n    void __saniti"
  },
  {
    "path": "cmake/code_tests/Source_location_default_argument.cc",
    "chars": 249,
    "preview": "#include<source_location>\n\nint test_source_location(int line,\n                         std::source_location loc = std::s"
  },
  {
    "path": "cmake/code_tests/Source_location_test.cc",
    "chars": 625,
    "preview": "#if __has_include(<source_location>)\n#include <source_location>\n#endif\n\n#ifdef __cpp_lib_source_location\nusing source_lo"
  },
  {
    "path": "cmake/code_tests/rt_test.cc",
    "chars": 156,
    "preview": "extern \"C\" {\n#include <signal.h>\n#include <time.h>\n}\n\nint main() {\n    timer_t td;\n    struct sigevent sev;\n    timer_cr"
  },
  {
    "path": "cmake/code_tests/stdout_test.cc",
    "chars": 82,
    "preview": "#include <cstdio>\n\nenum class logger_type {\n  stdout,\n  stderr,\n};\n\nint main() {}\n"
  },
  {
    "path": "coding-style.md",
    "chars": 5522,
    "preview": "# Seastar Coding Style\n\n## Files\n\nHeader files have the `.hh` extension, source files use the `.cc` extension. All files"
  },
  {
    "path": "configure.py",
    "chars": 15303,
    "preview": "#!/usr/bin/env python3\n#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, V"
  },
  {
    "path": "cooking.sh",
    "chars": 26472,
    "preview": "#!/bin/bash\n\n#\n# Copyright 2018 Jesse Haber-Kucharsky\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "cooking_recipe.cmake",
    "chars": 10490,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "debug/task-latency.stap",
    "chars": 563,
    "preview": "#!/usr/bin/stap\n\n# usage: task_latency.stap process_name latency_threshold_ms\n\nglobal start_time\n\nprobe process(@1).mark"
  },
  {
    "path": "demos/CMakeLists.txt",
    "chars": 3200,
    "preview": "#\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the \"Licens"
  },
  {
    "path": "demos/block_discard_demo.cc",
    "chars": 2412,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/coroutines_demo.cc",
    "chars": 2435,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/echo_demo.cc",
    "chars": 3590,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/file_demo.cc",
    "chars": 10846,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/hello-cxx-module.cc",
    "chars": 1038,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/hello-world.cc",
    "chars": 1128,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/http_client_demo.cc",
    "chars": 4534,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/ip_demo.cc",
    "chars": 1425,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/l3_demo.cc",
    "chars": 1633,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/line_count_demo.cc",
    "chars": 2903,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/rpc_demo.cc",
    "chars": 14905,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/scheduling_group_demo.cc",
    "chars": 7321,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/sharded_parameter_demo.cc",
    "chars": 2800,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tcp_demo.cc",
    "chars": 2453,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tcp_sctp_client_demo.cc",
    "chars": 10695,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tcp_sctp_server_demo.cc",
    "chars": 7992,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tls_echo_server.hh",
    "chars": 4821,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tls_echo_server_demo.cc",
    "chars": 2968,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tls_simple_client_demo.cc",
    "chars": 5947,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/tutorial_examples.cc",
    "chars": 4353,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/udp_client_demo.cc",
    "chars": 2701,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/udp_server_demo.cc",
    "chars": 3264,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/udp_zero_copy_demo.cc",
    "chars": 4489,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/websocket_client_demo.cc",
    "chars": 4013,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "demos/websocket_server_demo.cc",
    "chars": 2985,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "doc/CMakeLists.txt",
    "chars": 1968,
    "preview": "find_program (Seastar_DOXYGEN_EXECUTABLE doxygen)\nif (NOT Seastar_DOXYGEN_EXECUTABLE)\n  message (FATAL_ERROR \"doxygen is"
  },
  {
    "path": "doc/Doxyfile.in",
    "chars": 103752,
    "preview": "# Doxyfile 1.8.9.1\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org"
  },
  {
    "path": "doc/DoxygenLayout.xml",
    "chars": 5898,
    "preview": "<doxygenlayout version=\"1.0\">\n  <!-- Generated by doxygen 1.8.13 -->\n  <!-- Navigation index tabs for HTML output -->\n  "
  },
  {
    "path": "doc/compatibility.md",
    "chars": 5775,
    "preview": "Compatibility\n=============\n\nAs a library, Seastar aims to maintain backwards compatibility\nin terms of the source (appl"
  },
  {
    "path": "doc/contributing.md",
    "chars": 1097,
    "preview": "Contributing to Seastar\n=======================\n\n# Sending Patches\nSeastar follows a patch submission similar to Linux. "
  },
  {
    "path": "doc/generator.md",
    "chars": 15080,
    "preview": "# Coroutine Generator\n\n## Overview\n\nThe generator implementation is based on C++23 proposal [P2502R2](https://wg21.link/"
  },
  {
    "path": "doc/htmlsplit.py",
    "chars": 5874,
    "preview": "#!/usr/bin/env python3\n\n# This script takes the single-page HTML output from pandoc - tutorial.html -\n# and splits it in"
  },
  {
    "path": "doc/io-properties-file.md",
    "chars": 2201,
    "preview": "# Specifying the I/O properties of a system\n\nThe I/O properties of a system can be specified as a YAML string, by\nusing "
  },
  {
    "path": "doc/io-scheduler.md",
    "chars": 5137,
    "preview": "IO scheduler uses rate-limiter to throttle the amount of data it dispatches into the disk.\n\n# Basic math\n\nThe scheduler'"
  },
  {
    "path": "doc/io-tester.md",
    "chars": 5221,
    "preview": "## I/O Tester utility\n\nThe I/O Tester utility, `io_tester` generates a user-defined I/O pattern\nspanning one of multiple"
  },
  {
    "path": "doc/lambda-coroutine-fiasco.md",
    "chars": 4188,
    "preview": "# The Lambda Coroutine Fiasco\n\nLambda coroutines and Seastar APIs that accept continuations interact badly. This\ndocumen"
  },
  {
    "path": "doc/md2html",
    "chars": 1104,
    "preview": "#!/bin/sh\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the"
  },
  {
    "path": "doc/md2pdf",
    "chars": 911,
    "preview": "#!/bin/sh\n# This file is open source software, licensed to you under the terms\n# of the Apache License, Version 2.0 (the"
  },
  {
    "path": "doc/mini-tutorial.md",
    "chars": 6089,
    "preview": "Futures and promises\n--------------------\n\nA *future* is a result of a computation that may not be available yet.\nExampl"
  },
  {
    "path": "doc/native-stack.md",
    "chars": 2368,
    "preview": "Seastar Native TCP/IP Stack\n---------------------------\n\nSeastar comes with a native, sharded TCP/IP stack.  Usually it "
  },
  {
    "path": "doc/network-configuration.md",
    "chars": 2698,
    "preview": "Network Configuration\n---------------------\n\nIn order to support multiple network devices in Seastar, new Network Config"
  },
  {
    "path": "doc/network-connection-load-balancing.md",
    "chars": 2172,
    "preview": "# Motivation\n\nIn sharded systems like seastar it is important for work to be\ndistributed equally between all shards to a"
  },
  {
    "path": "doc/prometheus.md",
    "chars": 5024,
    "preview": "# The Prometheus Protocol\n\nSeastar supports the Prometheus protocol for metrics reporting.\nSupported exposition formats "
  },
  {
    "path": "doc/rpc-compression.md",
    "chars": 2170,
    "preview": "# RPC provided compression infrastructure\n\n## Compression algorithm negotiation\n\nRPC protocol only defines `COMPRESS` fe"
  },
  {
    "path": "doc/rpc-streaming.md",
    "chars": 4915,
    "preview": "# RPC streaming\n\n## Streaming API\n\n### Sink and Source\n\nBasic element of streaming API is `rpc::sink` and `rpc::source`."
  },
  {
    "path": "doc/rpc.md",
    "chars": 7037,
    "preview": "# RPC protocol\n\n## Data encoding\n\nAll integral data is encoded in little endian format.\n\n## Protocol negotiation\n\nThe ne"
  },
  {
    "path": "doc/shared-token-bucket.md",
    "chars": 4272,
    "preview": "# Shared token bucket\n\n## Intro\n\nThe classical token bucket has two parameters -- rate and limit. The rate\nis the amount"
  },
  {
    "path": "doc/signal.md",
    "chars": 1788,
    "preview": "# Signals\n\nSeastar provides an interface to handle signals natively and safely as asynchronous tasks.\n\n## Default Signal"
  },
  {
    "path": "doc/template.css",
    "chars": 2730,
    "preview": "/* CSS style for Seastar's tutorial.\n * TODO: We also get some style for syntax highlighting inserted by our\n * use of \""
  },
  {
    "path": "doc/template.tex",
    "chars": 3184,
    "preview": "% The pandoc command line (see configure.py) can communicate variables to this\n% LaTeX skelaton, by using the \"-V varnam"
  },
  {
    "path": "doc/testing.md",
    "chars": 3993,
    "preview": "# Testing\n\nSeastar leverages Boost.Test and provides facilities for developers to implement tests in coroutines.\n\n## Tes"
  },
  {
    "path": "doc/tutorial.md",
    "chars": 170409,
    "preview": "% Asynchronous Programming with Seastar\n% Nadav Har'El - nyh@ScyllaDB.com\n  Avi Kivity - avi@ScyllaDB.com\n\n# Introductio"
  },
  {
    "path": "doc/websocket.md",
    "chars": 2164,
    "preview": "# WebSocket protocol implementation\n\nSeastar includes an experimental implementation of a WebSocket server.\nRefs:\nhttps:"
  },
  {
    "path": "docker/dev/Dockerfile",
    "chars": 1096,
    "preview": "# syntax=docker/dockerfile:1\n\nFROM ubuntu:plucky\n\nRUN --mount=type=bind,source=./install-dependencies.sh,target=/install"
  },
  {
    "path": "include/seastar/core/abort_on_ebadf.hh",
    "chars": 1281,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/abort_on_expiry.hh",
    "chars": 1807,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/abort_source.hh",
    "chars": 9046,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/abortable_fifo.hh",
    "chars": 8930,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/alien.hh",
    "chars": 6839,
    "preview": "// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-\n/*\n * This file is open source software, licens"
  },
  {
    "path": "include/seastar/core/align.hh",
    "chars": 1524,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/aligned_buffer.hh",
    "chars": 1369,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/app-template.hh",
    "chars": 7391,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/bitops.hh",
    "chars": 1786,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/bitset-iter.hh",
    "chars": 4926,
    "preview": "/*\n * Copyright (C) 2014 Cloudius Systems, Ltd.\n */\n\n/*\n * Imported from OSv:\n *\n * Copyright (C) 2014 Cloudius Systems,"
  },
  {
    "path": "include/seastar/core/byteorder.hh",
    "chars": 2502,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/cacheline.hh",
    "chars": 1249,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/checked_ptr.hh",
    "chars": 6305,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/chunked_fifo.hh",
    "chars": 22772,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/circular_buffer.hh",
    "chars": 15364,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/circular_buffer_fixed_capacity.hh",
    "chars": 11271,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/condition-variable.hh",
    "chars": 16902,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/coroutine.hh",
    "chars": 9403,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/deleter.hh",
    "chars": 8399,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/disk_params.hh",
    "chars": 3178,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/distributed.hh",
    "chars": 987,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/do_with.hh",
    "chars": 4953,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/dpdk_rte.hh",
    "chars": 1944,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/enum.hh",
    "chars": 1326,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/exception_hacks.hh",
    "chars": 834,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/execution_stage.hh",
    "chars": 21889,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/expiring_fifo.hh",
    "chars": 6979,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/fair_queue.hh",
    "chars": 12555,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/file-types.hh",
    "chars": 5050,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/file.hh",
    "chars": 29551,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/format.hh",
    "chars": 1408,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/fsnotify.hh",
    "chars": 7803,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/fsqual.hh",
    "chars": 923,
    "preview": "/*\n * Copyright 2017 ScyllaDB\n */\n/*\n * This file is open source software, licensed to you under the terms\n * of the Apa"
  },
  {
    "path": "include/seastar/core/fstream.hh",
    "chars": 5591,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/function_traits.hh",
    "chars": 2521,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/future-util.hh",
    "chars": 1099,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/future.hh",
    "chars": 79347,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/gate.hh",
    "chars": 13822,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/idle_cpu_handler.hh",
    "chars": 2469,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/api-level.hh",
    "chars": 1617,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/buffer_allocator.hh",
    "chars": 1244,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/current_task.hh",
    "chars": 1183,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/estimated_histogram.hh",
    "chars": 14950,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/io_desc.hh",
    "chars": 1129,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/io_intent.hh",
    "chars": 4046,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/io_request.hh",
    "chars": 11630,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/io_sink.hh",
    "chars": 2037,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/linux-aio.hh",
    "chars": 5989,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/poll.hh",
    "chars": 3034,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/pollable_fd.hh",
    "chars": 8420,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/run_in_background.hh",
    "chars": 1025,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/stall_detector.hh",
    "chars": 6397,
    "preview": "\n/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Li"
  },
  {
    "path": "include/seastar/core/internal/systemwide_memory_barrier.hh",
    "chars": 1078,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/internal/uname.hh",
    "chars": 1831,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/io_intent.hh",
    "chars": 3485,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/io_priority_class.hh",
    "chars": 958,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/io_queue.hh",
    "chars": 17978,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/iostream-impl.hh",
    "chars": 20800,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/iostream.hh",
    "chars": 22716,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "include/seastar/core/layered_file.hh",
    "chars": 2335,
    "preview": "/*\n * This file is open source software, licensed to you under the terms\n * of the Apache License, Version 2.0 (the \"Lic"
  }
]

// ... and 460 more files (download for full content)

About this extraction

This page contains the full source code of the scylladb/seastar GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 660 files (6.1 MB), approximately 1.6M tokens, and a symbol index with 10340 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!