Skip to content

Commit

Permalink
Merge branch 'main' into ci-bench-msquic
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Eggert <[email protected]>
  • Loading branch information
larseggert authored Mar 16, 2024
2 parents 7f46abb + ec4ec8e commit efa5796
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

jobs:
incremental-mutants:
mutants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -40,14 +40,14 @@ jobs:
git diff origin/${{ github.base_ref }}.. > pr.diff
set -o pipefail
cargo mutants --test-tool=nextest --no-shuffle -j 2 -vV --in-diff pr.diff | tee results.txt || true
echo 'TITLE="Incremental Mutants"' >> "$GITHUB_ENV"
echo 'TITLE=Incremental Mutants' >> "$GITHUB_ENV"
- name: Find mutants
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: |
set -o pipefail
cargo mutants --test-tool=nextest -vV --in-place | tee results.txt || true
echo 'TITLE="All Mutants"' >> "$GITHUB_ENV"
echo 'TITLE=All Mutants' >> "$GITHUB_ENV"
- name: Post step summary
if: always()
Expand All @@ -56,7 +56,7 @@ jobs:
echo "### $TITLE"
echo "See https://mutants.rs/using-results.html for more information."
echo '```'
cat results.txt
sed 's/\x1b\[[0-9;]*[mGKHF]//g' results.txt
echo '```'
} > "$GITHUB_STEP_SUMMARY"
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ rust-version = "1.74.0"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }

[profile.release]
lto = "fat"

[profile.bench]
# Inherits from the "release" profile, so just provide overrides here:
# https://doc.rust-lang.org/cargo/reference/profiles.html#release
Expand Down
7 changes: 5 additions & 2 deletions neqo-transport/benches/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use std::time::Duration;

use criterion::{criterion_group, criterion_main, BatchSize::SmallInput, Criterion};
use criterion::{criterion_group, criterion_main, BatchSize::SmallInput, Criterion, Throughput};
use test_fixture::{
boxed,
sim::{
Expand All @@ -21,7 +21,9 @@ const JITTER: Duration = Duration::from_millis(10);
const TRANSFER_AMOUNT: usize = 1 << 22; // 4Mbyte

fn benchmark_transfer(c: &mut Criterion, label: &str, seed: Option<impl AsRef<str>>) {
c.bench_function(label, |b| {
let mut group = c.benchmark_group("transfer");
group.throughput(Throughput::Bytes(u64::try_from(TRANSFER_AMOUNT).unwrap()));
group.bench_function(label, |b| {
b.iter_batched(
|| {
let nodes = boxed![
Expand All @@ -44,6 +46,7 @@ fn benchmark_transfer(c: &mut Criterion, label: &str, seed: Option<impl AsRef<st
SmallInput,
)
});
group.finish();
}

fn benchmark_transfer_variable(c: &mut Criterion) {
Expand Down

0 comments on commit efa5796

Please sign in to comment.