summaryrefslogtreecommitdiff
path: root/tests/scripts/run-xunit-perf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/run-xunit-perf.sh')
-rwxr-xr-x[-rw-r--r--]tests/scripts/run-xunit-perf.sh70
1 files changed, 39 insertions, 31 deletions
diff --git a/tests/scripts/run-xunit-perf.sh b/tests/scripts/run-xunit-perf.sh
index cea29c0214..85ac43321b 100644..100755
--- a/tests/scripts/run-xunit-perf.sh
+++ b/tests/scripts/run-xunit-perf.sh
@@ -30,6 +30,11 @@ function print_usage {
echo ' (e.g. "corefx/bin/Linux.AnyCPU.Debug;corefx/bin/Unix.AnyCPU.Debug;corefx/bin/AnyOS.AnyCPU.Debug").'
echo ' If files with the same name are present in multiple directories, the first one wins.'
echo ' --coreFxNativeBinDir=<path> : Directory of the CoreFX native build (e.g. corefx/bin/Linux.x64.Debug).'
+ echo ' --uploadToBenchview : Specify this flag in order to have the results of the run uploaded to Benchview.'
+ echo ' This also requires that the os flag and runtype flag to be set. Lastly you must'
+ echo ' also have the BV_UPLOAD_SAS_TOKEN set to a SAS token for the Benchview upload container'
+ echo ' --benchViewOS=<os> : Specify the os that will be used to insert data into Benchview.'
+ echo ' --runType=<private|rolling> : Specify the runType for Benchview.'
}
# Variables for xUnit-style XML output. XML format: https://xunit.github.io/docs/format-xml-v2.html
@@ -311,6 +316,9 @@ coreClrBinDir=
mscorlibDir=
coreFxBinDir=
coreFxNativeBinDir=
+uploadToBenchview=
+benchViewOS=
+runType=
for i in "$@"
do
@@ -340,6 +348,15 @@ do
--coreFxNativeBinDir=*)
coreFxNativeBinDir=${i#*=}
;;
+ --benchViewOS=*)
+ benchViewOS=${i#*=}
+ ;;
+ --runType=*)
+ runType=${i#*=}
+ ;;
+ --uploadToBenchview)
+ uploadToBenchview=TRUE
+ ;;
*)
echo "Unknown switch: $i"
print_usage
@@ -371,11 +388,6 @@ fi
export NUGET_PACKAGES=$testNativeBinDir/../../../../packages
echo "NUGET_PACKAGES = $NUGET_PACKAGES"
-echo "dir $testNativeBinDir/../../../../Tools"
-dir $testNativeBinDir/../../../../Tools
-echo "dir $testNativeBinDir/../../../../Tools/dotnetcli"
-dir $testNativeBinDir/../../../../Tools/dotnetcli
-
pushd $testNativeBinDir/../../../../tests/scripts
$testNativeBinDir/../../../../Tools/dotnetcli/dotnet restore --fallbacksource https://dotnet.myget.org/F/dotnet-buildtools/ --fallbacksource https://dotnet.myget.org/F/dotnet-core/
popd
@@ -385,49 +397,45 @@ create_core_overlay
precompile_overlay_assemblies
copy_test_native_bin_to_test_root
-echo "find $testNativeBinDir/../../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'"
-find $testNativeBinDir/../../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'
-echo "find $testNativeBinDir/../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'"
-find $testNativeBinDir/../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'
-
# Deploy xunit performance packages
cd $CORE_ROOT
+echo "CORE_ROOT dir = $CORE_ROOT"
DO_SETUP=TRUE
if [ ${DO_SETUP} == "TRUE" ]; then
-
-echo "dir $testNativeBinDir/../../../../../"
-dir $testNativeBinDir/../../../../../
-echo "dir $testNativeBinDir/../../../../../packages"
-dir $testNativeBinDir/../../../../../packages
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3
-
-sudo cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
-
-sudo cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0035/lib/dotnet/*.dll .
-
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0040/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.analysis.cli/1.0.0-alpha-build0040/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.analysis.cli.dll .
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0040/lib/dotnet/*.dll .
fi
# Run coreclr performance tests
echo "Test root dir is: $testRootDir"
-tests=($(find $testRootDir/JIT/Performance/CodeQuality -name '*.exe'))
+tests=($(find $testRootDir/JIT/Performance/CodeQuality -name '*.exe') $(find $testRootDir/performance/perflab/PerfLab -name '*.dll'))
+echo "current dir is $PWD"
+rm measurement.json
for testcase in ${tests[@]}; do
test=$(basename $testcase)
testname=$(basename $testcase .exe)
echo "....Running $testname"
-
cp $testcase .
+chmod u+x ./corerun
+echo "./corerun Microsoft.DotNet.xunit.performance.runner.cli.dll $test -runner xunit.console.netcore.exe -runnerhost ./corerun -verbose -runid perf-$testname"
./corerun Microsoft.DotNet.xunit.performance.runner.cli.dll $test -runner xunit.console.netcore.exe -runnerhost ./corerun -verbose -runid perf-$testname
-
+echo "./corerun Microsoft.DotNet.xunit.performance.analysis.cli.dll perf-$testname.xml -xml perf-$testname-summary.xml"
+./corerun Microsoft.DotNet.xunit.performance.analysis.cli.dll perf-$testname.xml -xml perf-$testname-summary.xml
+if [ "$uploadToBenchview" == "TRUE" ]
+ then
+ python3.5 ../../../../../tests/scripts/Microsoft.BenchView.JSONFormat/tools/measurement.py xunit perf-$testname.xml --better desc --drop-first-value --append
+fi
done
+if [ "$uploadToBenchview" == "TRUE" ]
+ then
+ python3.5 ../../../../../tests/scripts/Microsoft.BenchView.JSONFormat/tools/submission.py measurement.json --build ../../../../../build.json --machine-data ../../../../../machinedata.json --metadata ../../../../../submission-metadata.json --group "CoreCLR" --type "$runType" --config-name "Release" --config Configuration "Release" --config OS "$benchViewOS" --arch "x64" --machinepool "Perfsnake"
+ python3.5 ../../../../../tests/scripts/Microsoft.BenchView.JSONFormat/tools/upload.py submission.json --container coreclr
+fi
+mkdir ../../../../../sandbox
+cp *.xml ../../../../../sandbox