Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

chore: bootstrapping task-manager through feature flags #266

Merged
merged 24 commits into from
Jul 26, 2023
Merged

Conversation

gruberb
Copy link
Contributor

@gruberb gruberb commented Jul 21, 2023

Description

This PR introduces the TaskManager to the codebase. It is an in-between step, whereas we can benchmark two different implementations of the TaskManager

  • task-manager-futures: Using FuturesUnordered for tasks to remove themselves after being done.
  • task-manager-channel: To send a message to the TaskManager and removing them by hand.

Fixes TP-644

Additions and Changes

Feature flag task-manager-channels to build and run the codebase with the channels implementation instead of the futures one.

task-manager-futures runs by default and gets deactivated when using the features flag task-manager-channels.

New feature (non-breaking change which adds functionality)

Splitting the work of the double_echo into tasks, and let them run in parallel.

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #266 (55b0530) into main (0fa742a) will decrease coverage by 0.44%.
The diff coverage is 89.93%.

@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
- Coverage   52.99%   52.56%   -0.44%     
==========================================
  Files         207      203       -4     
  Lines        9978     9803     -175     
==========================================
- Hits         5288     5153     -135     
+ Misses       4690     4650      -40     
Files Changed Coverage Δ
crates/topos-tce-broadcast/src/constant.rs 40.00% <0.00%> (-26.67%) ⬇️
...s-tce-broadcast/src/double_echo/broadcast_state.rs 83.91% <50.00%> (-1.20%) ⬇️
...pos-tce-broadcast/src/task_manager_futures/task.rs 90.90% <71.42%> (-2.43%) ⬇️
...opos-tce-broadcast/src/task_manager_futures/mod.rs 85.00% <87.50%> (-2.50%) ⬇️
crates/topos-tce-broadcast/src/lib.rs 89.13% <90.00%> (+0.49%) ⬆️
crates/topos-tce-broadcast/src/double_echo/mod.rs 82.43% <97.14%> (+18.43%) ⬆️
crates/topos-tce-broadcast/src/tests/mod.rs 100.00% <100.00%> (+2.15%) ⬆️

... and 6 files with indirect coverage changes

@gruberb gruberb changed the title chore: adding task-manager feature flags chore: adding task-manager and feature flags Jul 21, 2023
@gruberb gruberb changed the title chore: adding task-manager and feature flags chore: bootstrapping task-manager through feature flags Jul 21, 2023
crates/topos-tce-broadcast/Cargo.toml Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/benches/double_echo.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/benches/double_echo.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/lib.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/tests/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/tests/mod.rs Outdated Show resolved Hide resolved
crates/topos/Cargo.toml Outdated Show resolved Hide resolved
crates/topos/Cargo.toml Outdated Show resolved Hide resolved
crates/topos/build.rs Outdated Show resolved Hide resolved
@gruberb gruberb marked this pull request as ready for review July 25, 2023 13:42
@gruberb gruberb requested a review from a team as a code owner July 25, 2023 13:42
crates/topos-tce-broadcast/src/constant.rs Outdated Show resolved Hide resolved
crates/topos/Cargo.toml Outdated Show resolved Hide resolved
@gruberb gruberb merged commit 6ea6db6 into main Jul 26, 2023
20 checks passed
@gruberb gruberb deleted the feat/TP-644 branch July 26, 2023 10:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants