Skip to content

Commit

Permalink
Update Balter to 0.3.0
Browse files Browse the repository at this point in the history
With the recent overhaul of the TPS sampling mechanism and removing
Pin<Box<T>> from the hot-path, the newest Balter release is faster and
more accurate than ever. Unfortunately also broke the distributed
functionality, but that was experimental anyways.
  • Loading branch information
byronwasti committed Feb 8, 2024
1 parent 86afddc commit a00896a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CHANGELOG

## Balter 0.3.0 (balter-macros 0.2.0)

### Overhauled TPS sampling mechanism
After a ton of experimentation with different ways to measure TPS, I settled upon having
long-running tasks which all coordinate with the primary task via Atomics, and using ArcSwap
for anything that could not be done via an Atomic. This seems to hit the sweet spot of
accurate measurements and performance.

### Pin<Box<impl Future>> no longer in the hot path!

This is a major refactor which moves all Pin<Box<T>>'s out of the hot path. I am planning to
put together more documentation and benchmarks surrounding this change, since it surprised me
at the cost of Pin<Box<T>>. With the minimal benchmarking I've done, the performance
difference is fairly massive!

Unfortunately, the cost is that I've broken the distributed runtime functionality. It should
be a relatively simple fix to patch up the types, but I want to focus on stabalizing the
various controller logic first.

### Minor Changes

- Added a `direct()` scenario which is primarily useful for development.
- Added some benchmarking code and a section for thorough benchmarking in the codebase.
- Various minor bug fixes.
6 changes: 3 additions & 3 deletions balter-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "balter"
license = "MIT"
version = "0.2.1"
version = "0.3.0"
edition = "2021"
authors = ["Byron Wasti <[email protected]>"]
homepage = "https://github.com/byronwasti/balter"
Expand All @@ -14,12 +14,12 @@ publish = true

[dependencies]
arc-swap = "1.6.0"
balter-macros = { version = "0.1", path = "../balter-macros" }
balter-macros = { version = "0.2", path = "../balter-macros" }
governor = "0.6.0"
humantime = "2.1.0"
pin-project = "1.1.2"
thiserror = "1.0.56"
tokio = { version = "1.29.1", features = ["rt"] }
tokio = { version = "1.29.1", features = ["rt", "time"] }
tracing = "0.1.37"

async-channel = { version = "2.1.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion balter-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "balter-macros"
license = "MIT"
version = "0.1.4"
version = "0.2.0"
edition = "2021"
readme = "README.md"
authors = ["Byron Wasti <[email protected]>"]
Expand Down

0 comments on commit a00896a

Please sign in to comment.