Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/neqo-transport/src/cc/tests/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  mod.rs

  Sprache: Rust
 

// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::{
    net::{IpAddr, Ipv4Addr},
    time::Duration,
};

use crate::{
    MIN_INITIAL_PACKET_SIZE, Pmtud,
    cc::{
        CWND_INITIAL_PKTS, ClassicSlowStart, classic_cc::ClassicCongestionController, cubic::Cubic,
        hystart::HyStart, new_reno::NewReno,
    },
};

mod cubic;
mod hystart;
mod new_reno;
mod search;

pub const IP_ADDR: IpAddr = IpAddr::V4(Ipv4Addr::UNSPECIFIED);
pub const MTU: Option<usize> = Some(1_500);
pub const RTT: Duration = Duration::from_millis(100);
pub const INITIAL_CWND: usize = CWND_INITIAL_PKTS * MIN_INITIAL_PACKET_SIZE;

/// Helper to create `ClassicCongestionController` with New Reno for tests.
pub fn make_cc_newreno() -> ClassicCongestionController<ClassicSlowStart, NewReno> {
    ClassicCongestionController::new(
        ClassicSlowStart::default(),
        NewReno::default(),
        Pmtud::new(IP_ADDR, MTU),
        true,
    )
}

/// Helper to create `ClassicCongestionController` with Cubic for tests.
pub fn make_cc_cubic() -> ClassicCongestionController<ClassicSlowStart, Cubic> {
    ClassicCongestionController::new(
        ClassicSlowStart::default(),
        Cubic::default(),
        Pmtud::new(IP_ADDR, MTU),
        true,
    )
}

/// Helper to create `ClassicCongestionController` with HyStart++ for tests.
pub fn make_cc_hystart(paced: bool) -> ClassicCongestionController<HyStart, Cubic> {
    ClassicCongestionController::new(
        HyStart::new(paced, crate::cc::HyStartCssBaseline::default()),
        Cubic::default(),
        Pmtud::new(IP_ADDR, MTU),
        true,
    )
}

Messung V0.5 in Prozent
C=90 H=98 G=94

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.