[tests] Merge runtime test timing measurements into one plot (#815)
- also dump logcat only once per target run, we don't need to differentiate it for various tests, as they are batched over one emulator instance
This commit is contained in:
Родитель
bd18b365ad
Коммит
320d773824
|
@ -146,11 +146,14 @@
|
|||
<Output TaskParameter="FailedToRun" ItemName="_FailedComponent"/>
|
||||
</RunInstrumentationTests>
|
||||
<PropertyGroup>
|
||||
<_DefinitionsFilename Condition=" '%(UnitTestApk.TimingDefinitionsFilename)' == '' ">$(MSBuildThisFileDirectory)/TimingDefinitions.txt</_DefinitionsFilename>
|
||||
<_DefinitionsFilename Condition=" '%(UnitTestApk.TimingDefinitionsFilename)' != '' ">%(UnitTestApk.TimingDefinitionsFilename)</_DefinitionsFilename>
|
||||
<_LogcatFilenameEnd>-logcat-$(Configuration)$(_AotName).txt</_LogcatFilenameEnd>
|
||||
<_LogcatFilename>logcat-$(Configuration)$(_AotName).txt</_LogcatFilename>
|
||||
</PropertyGroup>
|
||||
<Exec Command=""$(AdbToolPath)\$(AdbToolExe)" $(_AdbTarget) $(AdbOptions) logcat -v threadtime -d > %(UnitTestApk.Package)$(_LogcatFilenameEnd)" />
|
||||
<ProcessLogcatTiming InputFilename="%(UnitTestApk.Package)$(_LogcatFilenameEnd)" ApplicationPackageName="%(UnitTestApk.Package)" ResultsFilename="%(UnitTestApk.ResultsPath)" DefinitionsFilename="$(_DefinitionsFilename)" />
|
||||
<Exec Command=""$(AdbToolPath)\$(AdbToolExe)" $(_AdbTarget) $(AdbOptions) logcat -v threadtime -d > $(_LogcatFilename)" />
|
||||
<ProcessLogcatTiming
|
||||
InputFilename="$(_LogcatFilename)"
|
||||
ApplicationPackageName="%(UnitTestApk.Package)"
|
||||
ResultsFilename="%(UnitTestApk.ResultsPath)"
|
||||
DefinitionsFilename="%(UnitTestApk.TimingDefinitionsFilename)"
|
||||
AddResults="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.ProcessPlotInput" />
|
||||
<PropertyGroup>
|
||||
<_MonoAndroidTestResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-$(Configuration)$(_AotName).xml</_MonoAndroidTestResultsPath>
|
||||
<_MonoAndroidTestResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests.xml</_MonoAndroidTestResultsPath>
|
||||
<_MonoAndroidTestPackage>Mono.Android_Tests</_MonoAndroidTestPackage>
|
||||
<_MonoAndroidTestApkFile>$(OutputPath)Mono.Android_Tests-Signed.apk</_MonoAndroidTestApkFile>
|
||||
<_MonoAndroidTestApkSizesInput>apk-sizes-$(_MonoAndroidTestPackage)-$(Configuration)$(_AotName).txt</_MonoAndroidTestApkSizesInput>
|
||||
|
@ -12,10 +12,11 @@
|
|||
<Package>$(_MonoAndroidTestPackage)</Package>
|
||||
<InstrumentationType>xamarin.android.runtimetests.TestInstrumentation</InstrumentationType>
|
||||
<ResultsPath>$(_MonoAndroidTestResultsPath)</ResultsPath>
|
||||
<TimingDefinitionsFilename>$(MSBuildThisFileDirectory)timing-definitions-$(Configuration)$(_AotName).txt</TimingDefinitionsFilename>
|
||||
</UnitTestApk>
|
||||
</ItemGroup>
|
||||
<Target Name="_RecordApkSizes" AfterTargets="DeployUnitTestApks">
|
||||
<Delete Files="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-values.csv" Condition=" '$(Configuration)' == 'Debug' " />
|
||||
<Delete Files="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-values.csv;$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-times.csv" Condition=" '$(Configuration)' == 'Debug' " />
|
||||
<Exec Condition=" '$(HostOS)' == 'Darwin' " Command="stat -f "stat: %z %N" "$(_MonoAndroidTestApkFile)" > $(_MonoAndroidTestApkSizesInput)" />
|
||||
<Exec Condition=" '$(HostOS)' == 'Linux' " Command="stat -c "stat: %s %N" "$(_MonoAndroidTestApkFile)" > $(_MonoAndroidTestApkSizesInput)" />
|
||||
<Exec Command="unzip -l "$(_MonoAndroidTestApkFile)" >> $(_MonoAndroidTestApkSizesInput)" />
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# measure time of last monodroid-timing message appearance
|
||||
last-Debug=monodroid-timing:\s+(?<message>.*)$
|
||||
|
||||
# measure time of runtime and JNIEnv initialization end
|
||||
init-Debug=monodroid-timing:\s+(?<message>Runtime\.init: end native-to-managed.*)$
|
||||
JNI.init-Debug=monodroid-timing:\s+(?<message>JNIEnv\.Initialize end:.*)$
|
|
@ -0,0 +1,6 @@
|
|||
# measure time of last monodroid-timing message appearance
|
||||
last-Release-Aot=monodroid-timing:\s+(?<message>.*)$
|
||||
|
||||
# measure time of runtime and JNIEnv initialization end
|
||||
init-Release-Aot=monodroid-timing:\s+(?<message>Runtime\.init: end native-to-managed.*)$
|
||||
JNI.init-Release-Aot=monodroid-timing:\s+(?<message>JNIEnv\.Initialize end:.*)$
|
|
@ -0,0 +1,6 @@
|
|||
# measure time of last monodroid-timing message appearance
|
||||
last-Release=monodroid-timing:\s+(?<message>.*)$
|
||||
|
||||
# measure time of runtime and JNIEnv initialization end
|
||||
init-Release=monodroid-timing:\s+(?<message>Runtime\.init: end native-to-managed.*)$
|
||||
JNI.init-Release=monodroid-timing:\s+(?<message>JNIEnv\.Initialize end:.*)$
|
|
@ -5,6 +5,7 @@
|
|||
<Package>Xamarin.Android.JcwGen_Tests</Package>
|
||||
<InstrumentationType>xamarin.android.jcwgentests.TestInstrumentation</InstrumentationType>
|
||||
<ResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Xamarin.Android.JcwGen_Tests.xml</ResultsPath>
|
||||
<TimingDefinitionsFilename>$(MSBuildThisFileDirectory)..\..\..\build-tools\scripts\TimingDefinitions.txt</TimingDefinitionsFilename>
|
||||
</UnitTestApk>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<Package>Xamarin.Android.Locale_Tests</Package>
|
||||
<InstrumentationType>xamarin.android.localetests.TestInstrumentation</InstrumentationType>
|
||||
<ResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Xamarin.Android.Locale_Tests.xml</ResultsPath>
|
||||
<TimingDefinitionsFilename>$(MSBuildThisFileDirectory)..\..\..\build-tools\scripts\TimingDefinitions.txt</TimingDefinitionsFilename>
|
||||
</UnitTestApk>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче