Skip to content
Open
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
2 changes: 1 addition & 1 deletion JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,6 @@ function dotnetPreloads(type)
dotnetRuntimeUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/dotnet.runtime.js`,
wasmBinaryUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/dotnet.native.wasm`,
icuCustomUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/icudt_CJK.dat`,
dllCollectionsConcurrentUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Collections.Concurrent.wasm`,
dllCollectionsUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Collections.wasm`,
dllComponentModelPrimitivesUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.ComponentModel.Primitives.wasm`,
dllComponentModelTypeConverterUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.ComponentModel.TypeConverter.wasm`,
Expand All @@ -1877,6 +1876,7 @@ function dotnetPreloads(type)
dllObjectModelUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.ObjectModel.wasm`,
dllPrivateCorelibUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Private.CoreLib.wasm`,
dllRuntimeInteropServicesJavaScriptUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Runtime.InteropServices.JavaScript.wasm`,
dllSecurityCryptographyUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Security.Cryptography.wasm`,
dllTextEncodingsWebUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Text.Encodings.Web.wasm`,
dllTextJsonUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/System.Text.Json.wasm`,
dllAppUrl: `./workloads/dotnet/build-${type}/wwwroot/_framework/dotnet.wasm`,
Expand Down
10 changes: 4 additions & 6 deletions workloads/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ They run for different iterations/sizes, respectively for each half, depending o

## Build instructions

Download .NET SDK 9.0.3xx
Download .NET SDK 11.0

- [dotnet-sdk-win-x64.zip](https://aka.ms/dotnet/9.0.3xx/daily/dotnet-sdk-win-x64.zip)
- [dotnet-sdk-linux-x64.tar.gz](https://aka.ms/dotnet/9.0.3xx/daily/dotnet-sdk-linux-x64.tar.gz)
- [dotnet-sdk-win-x64.zip](https://aka.ms/dotnet/11.0/daily/dotnet-sdk-win-x64.zip)
- [dotnet-sdk-linux-x64.tar.gz](https://aka.ms/dotnet/11.0/daily/dotnet-sdk-linux-x64.tar.gz)

Run `build.sh` script. It will install `wasm-tools` workload & build the benchmark code twice (for Mono interpreter & AOT).

To run the benchmark code on `jsc`, we are prepending `import.meta.url ??= ""` to `dotnet.js`.
Run `build.sh` script. It will build the benchmark code twice (for Mono interpreter & AOT).

## Background on .NET / build output files

Expand Down
51 changes: 34 additions & 17 deletions workloads/dotnet/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

class Benchmark {
async init() {
// Match the boot config that `dotnet publish` embeds in the AOT build's
// dotnet.js, which lists every assembly under `coreAssembly`.
const isCore = dotnetFlavor === "aot";

this.config = {
mainAssemblyName: "dotnet.dll",
globalizationMode: "custom",
Expand Down Expand Up @@ -53,65 +57,68 @@ class Benchmark {
buffer: await JetStream.getBinary(JetStream.preload.icuCustomUrl),
behavior: "icu"
},
{
name: "System.Collections.Concurrent.wasm",
resolvedUrl: JetStream.preload.dllCollectionsConcurrentUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllCollectionsConcurrentUrl),
behavior: "assembly"
},
{
name: "System.Collections.wasm",
resolvedUrl: JetStream.preload.dllCollectionsUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllCollectionsUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.ComponentModel.Primitives.wasm",
resolvedUrl: JetStream.preload.dllComponentModelPrimitivesUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllComponentModelPrimitivesUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.ComponentModel.TypeConverter.wasm",
resolvedUrl: JetStream.preload.dllComponentModelTypeConverterUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllComponentModelTypeConverterUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Drawing.Primitives.wasm",
resolvedUrl: JetStream.preload.dllDrawingPrimitivesUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllDrawingPrimitivesUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Drawing.wasm",
resolvedUrl: JetStream.preload.dllDrawingUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllDrawingUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.IO.Pipelines.wasm",
resolvedUrl: JetStream.preload.dllIOPipelinesUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllIOPipelinesUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Linq.wasm",
resolvedUrl: JetStream.preload.dllLinqUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllLinqUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Memory.wasm",
resolvedUrl: JetStream.preload.dllMemoryUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllMemoryUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.ObjectModel.wasm",
resolvedUrl: JetStream.preload.dllObjectModelUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllObjectModelUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Private.CoreLib.wasm",
Expand All @@ -127,17 +134,26 @@ class Benchmark {
behavior: "assembly",
isCore: true
},
{
name: "System.Security.Cryptography.wasm",
resolvedUrl: JetStream.preload.dllSecurityCryptographyUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllSecurityCryptographyUrl),
behavior: "assembly",
isCore
},
{
name: "System.Text.Encodings.Web.wasm",
resolvedUrl: JetStream.preload.dllTextEncodingsWebUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllTextEncodingsWebUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "System.Text.Json.wasm",
resolvedUrl: JetStream.preload.dllTextJsonUrl,
buffer: await JetStream.getBinary(JetStream.preload.dllTextJsonUrl),
behavior: "assembly"
behavior: "assembly",
isCore
},
{
name: "dotnet.wasm",
Expand All @@ -148,6 +164,7 @@ class Benchmark {
}
]
};

this.dotnet = (await JetStream.dynamicImport(JetStream.preload.dotnetUrl)).dotnet;

// This drives the workload size for BenchTasks half of the test.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified workloads/dotnet/build-aot/wwwroot/_framework/System.Memory.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

147 changes: 145 additions & 2 deletions workloads/dotnet/build-aot/wwwroot/_framework/dotnet.js

Large diffs are not rendered by default.

Loading
Loading