TransportProfile class
A simple transport model for turning a frame's byte count into an estimated wire time, so byte-budget numbers can be reasoned about as latency.
frameMs(bytes) = fixedOverheadMs + 1000 * bytes / bytesPerSecond.
This is a deliberately simple first-order model: a one-way overhead (link propagation / per-frame fixed cost) plus serialization time at the link's throughput. It is NOT a substitute for measuring on real hardware — it exists to show where byte count actually translates into latency. The honest conclusion it surfaces: byte savings dominate on bandwidth-limited links and are near-irrelevant on fast, RTT-dominated ones.
Constructors
- TransportProfile(String name, {required double bytesPerSecond, required double fixedOverheadMs})
-
const
Properties
- bytesPerSecond → double
-
final
- fixedOverheadMs → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
frameMs(
int bytes) → double -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
defaults
→ const List<
TransportProfile> - local → const TransportProfile
- Local pty: throughput so high these byte counts are effectively free.
- slow9600 → const TransportProfile
- A constrained link (≈9600 baud) where every byte costs ~0.83 ms — bandwidth-dominated, so byte savings translate directly to time.
- sshLan → const TransportProfile
- SSH over a LAN: fast, low latency.
- sshWan → const TransportProfile
- SSH over a WAN: ample bandwidth but ~40 ms one-way — RTT-dominated, so byte savings barely move the needle here.