MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / priority_weight

Function priority_weight

nodedb-bridge/src/wfq.rs:34–40  ·  view source on GitHub ↗

Dispatch weight for a given priority class. Critical gets 4×, Standard 2×, Bulk 1× the basic quantum.

(cls: PriorityClass)

Source from the content-addressed store, hash-verified

32///
33/// Critical gets 4×, Standard 2×, Bulk 1× the basic quantum.
34pub fn priority_weight(cls: PriorityClass) -> u32 {
35 match cls {
36 PriorityClass::Critical => 4,
37 PriorityClass::Standard => 2,
38 PriorityClass::Bulk => 1,
39 }
40}
41
42/// State for one per-database virtual sub-queue.
43struct VirtualQueue<T> {

Callers 1

pop_nextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected