Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions build/containers-scenarios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,17 @@ parameters:
- displayName: Json NTex
arguments: --scenario json_ntex --property scenario=JsonNTex
condition: Math.round(Date.now() / 43200000) % 10 == 8 # once every 10 half-days
- displayName: Fortunes NTex
arguments: --scenario fortunes_ntex --property scenario=FortunesNTex
condition: Math.round(Date.now() / 43200000) % 10 == 9 # once every 10 half-days
# Fortunes NTex is disabled: its docker build (ntex-db.dockerfile in
# TechEmpower/FrameworkBenchmarks) breaks because the fafhrd91/postgres
# ntex-3 tokio-postgres fork it depends on is no longer compatible
# with newer ntex-bytes resolved from TechEmpower's caret-versioned
# dep. TechEmpower/FrameworkBenchmarks is archived
# (https://github.com/TechEmpower/FrameworkBenchmarks), so no fix is
# coming upstream. See build/frameworks-database-scenarios.yml for
# the matching disable.
# - displayName: Fortunes NTex
# arguments: --scenario fortunes_ntex --property scenario=FortunesNTex
# condition: Math.round(Date.now() / 43200000) % 10 == 9 # once every 10 half-days

steps:
- ${{ each scenario in parameters.scenarios }}:
Expand Down
17 changes: 14 additions & 3 deletions build/frameworks-database-scenarios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,20 @@ parameters:
arguments: --scenario json_gin --load.variables.connections 512 --property scenario=JsonGin

# Ntex (Rust)

- displayName: Ntex Fortunes
arguments: --scenario fortunes_ntex --load.variables.connections 512 --property scenario=FortunesNtex
#
# Ntex Fortunes is disabled: the docker build for ntex-db.dockerfile
# is broken because the TechEmpower workspace pulls in the
# fafhrd91/postgres `ntex-3` tokio-postgres fork (frozen at commit
# fbc7a17), which is no longer compatible with the latest ntex-bytes
# (1.6+) that cargo resolves from TechEmpower's caret-versioned
# `ntex-bytes = "1.5"`. The workspace fails to compile with E0308
# mismatched-types errors on `BytesMut` vs `BytePages`.
# TechEmpower/FrameworkBenchmarks is now archived
# (https://github.com/TechEmpower/FrameworkBenchmarks), so a real fix
# upstream is unlikely and not worth chasing. Re-enable if the ntex
# source is brought back in-tree or pinned to a working dep set.
# - displayName: Ntex Fortunes
# arguments: --scenario fortunes_ntex --load.variables.connections 512 --property scenario=FortunesNtex

# Vertx (Java)

Expand Down
5 changes: 4 additions & 1 deletion build/job-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ variables:
value: -j https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TechEmpower/PlatformBenchmarks/benchmarks.html.json

- name: blazorWasmJobs
value: --config https://raw.githubusercontent.com/dotnet/aspnetcore/main/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json
# Use the local override under docker/wasm-performance/ instead of the upstream config
# at dotnet/aspnetcore. The local dockerfile installs Node.js 22 (Node 21 is EOL and
# recent aspnetcore npm dependencies require node 18 || 20 || >=22).
value: --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/docker/wasm-performance/benchmarks.compose.json


- name: mvcJobs
Expand Down
26 changes: 26 additions & 0 deletions docker/wasm-performance/benchmarks.compose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://raw.githubusercontent.com/aspnet/Benchmarks/master/src/BenchmarksDriver2/benchmarks.schema.json",
"scenarios": {
"blazorwasmbenchmark": {
"application": {
"job": "blazorwasmbenchmark"
}
}
},
"jobs": {
"blazorwasmbenchmark": {
"source": {
"repository": "https://github.com/aspnet/Benchmarks.git",
"branchOrCommit": "main",
"dockerFile": "docker/wasm-performance/dockerfile",
"dockerImageName": "blazorwasmbenchmark",
"dockerContextDirectory": "docker/wasm-performance"
},
"buildArguments": [
"gitBranch=main"
],
"waitForExit": true,
"readyStateText": "Application started."
}
}
}
45 changes: 45 additions & 0 deletions docker/wasm-performance/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Local override of dotnet/aspnetcore's src/Components/benchmarkapps/Wasm.Performance/dockerfile.
#
# Differences from upstream:
# - Installs Node.js 22 (LTS) via setup_22.x instead of Node.js 21 (EOL).
# Recent npm dependencies in aspnetcore (e.g. balanced-match, brace-expansion,
# minimatch, eslint-visitor-keys, @tootallnate/once) require node 18, 20, or >=22.
# Node 21 is no longer supported and `npm run build` fails with ERR_REQUIRE_ESM.
#
# Track upstream: https://github.com/dotnet/aspnetcore/blob/main/src/Components/benchmarkapps/Wasm.Performance/dockerfile
FROM mcr.microsoft.com/dotnet/sdk:latest AS build

ENV StressRunDuration=0
ARG DEBIAN_FRONTEND=noninteractive

# Setup for nodejs
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libunwind-dev \
nodejs \
git

ARG gitBranch=main

WORKDIR /src
ADD https://api.github.com/repos/dotnet/aspnetcore/git/ref/heads/${gitBranch} /aspnetcore.commit

RUN git init \
&& git fetch https://github.com/aspnet/aspnetcore ${gitBranch} \
&& git reset --hard FETCH_HEAD \
&& git submodule update --init \
&& git remote add origin https://github.com/aspnet/aspnetcore

RUN ./restore.sh
RUN npm run build
RUN .dotnet/dotnet publish -c Release -r linux-x64 --sc true -o /app ./src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj
RUN chmod +x /app/Wasm.Performance.Driver

WORKDIR /app
FROM mcr.microsoft.com/playwright/dotnet:v1.58.0-jammy-amd64 AS final
COPY --from=build ./app ./
COPY ./exec.sh ./

ENTRYPOINT [ "bash", "./exec.sh" ]
3 changes: 3 additions & 0 deletions docker/wasm-performance/exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

./Wasm.Performance.Driver $StressRunDuration
Loading