Skip to content

Commit

Permalink
Updated Benchmark-CI for .NET Core 3.1 (#160)
Browse files Browse the repository at this point in the history
* Updated Benchmark-CI for .NET Core 3.1

* Temp. run benchs in non-scheduled CI

* Fixed run-benchmarks.sh

* Revert "Temp. run benchs in non-scheduled CI"

This reverts commit 70b41c9.
  • Loading branch information
gfoidl authored Apr 15, 2020
1 parent 9a2c310 commit 22c9723
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .azure/pipelines/jobs/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ jobs:
vmImage: ${{ parameters.vmImage }}
timeoutInMinutes: 0 # 360 minutes
steps:
- task: UseDotNet@2
displayName: 'Use dotnet sdk 3.x'
inputs:
version: $(SDK_VERSION)
includePreviewVersions: true
# .NET Core 3 SDK is pre-installed
#- task: UseDotNet@2
# displayName: 'Use dotnet sdk 3.x'
# inputs:
# version: $(SDK_VERSION)
# includePreviewVersions: true

- bash: |
chmod u+x *.sh
Expand Down
10 changes: 5 additions & 5 deletions run-benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
#
## Helper for running Benchmarks. Per default Benchmarks are run on .NET Core 3.0.
## Helper for running Benchmarks. Per default Benchmarks are run on .NET Core 3.1.
# If Benchmarks should be run for .NET 4.6.1 the Environment Variables
# BENCH_FX must be set (see below).
#
# Environment Variables:
# BENCH_FX netcoreapp3.0 (default) or net461
# BENCH_FX netcoreapp3.1 (default) or net461
#------------------------------------------------------------------------------
set -e
#------------------------------------------------------------------------------
Expand All @@ -23,13 +23,13 @@ if [[ "$1" == "--install-sdk" ]]; then
echo ""
fi

tfm=${BENCH_FX:-netcoreapp3.0}
tfm=${BENCH_FX:-netcoreapp3.1}

echo ""
echo "Running benchmarks with tfm: $tfm"
echo "-------------------------------------------------"

if [[ "$tfm" == "netcoreapp3.0" ]]; then
if [[ "$tfm" == "netcoreapp3.1" ]]; then
echo "installed sdks:"
dotnet --list-sdks
echo "-------------------------------------------------"
Expand Down Expand Up @@ -61,7 +61,7 @@ $cmd -f *EncodeStringBenchmark*
$cmd -f *EncodeStringUrlBenchmark*
$cmd -f *EncodeUtf8Benchmark*

if [[ "$tfm" == "netcoreapp3.0" ]]; then
if [[ "$tfm" == "netcoreapp3.1" ]]; then
$cmd -f *ReadOnlySequenceBase64Benchmark*
$cmd -f *ReadOnlySequenceBase64UrlBenchmark*
fi

0 comments on commit 22c9723

Please sign in to comment.