Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sample-tester] Collect app size and build duration statistics. #7602

Merged
merged 41 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ca9e9d7
[sample-tester] Collect app size and build duration statistics.
rolfbjarne Nov 29, 2019
8aabf27
Always publish performance data.
rolfbjarne Nov 29, 2019
fdef027
[mmp] Add support for MMP_ENV_OPTIONS to mirror mtouch's MTOUCH_ENV_O…
rolfbjarne Nov 29, 2019
d447c5d
[sample-tester] Make mmp/mtouch show timing information, and get the …
rolfbjarne Nov 29, 2019
866a020
Collect task and target info.
rolfbjarne Nov 29, 2019
1e99f42
Add more perf data and a baseline test.
rolfbjarne Dec 2, 2019
28724af
Redo the base test a bit.
rolfbjarne Dec 2, 2019
2578bf7
More tweaks.
rolfbjarne Dec 2, 2019
1d1e2c4
More tweaks.
rolfbjarne Dec 16, 2019
a3ba23a
Huh?
rolfbjarne Dec 16, 2019
c3617a4
Debug stuff.
rolfbjarne Dec 17, 2019
2839202
diagnostics.
rolfbjarne Dec 17, 2019
e06f727
Better diagnostics.
rolfbjarne Dec 17, 2019
007d0db
cleanup
rolfbjarne Dec 17, 2019
9d814bb
Merge remote-tracking branch 'origin/master' into sample-test-statistics
rolfbjarne Dec 17, 2019
944c6ed
tmp
rolfbjarne Dec 17, 2019
999aeea
Use a separate stage to push data.
rolfbjarne Dec 17, 2019
fa1d2f2
Next attempt.
rolfbjarne Dec 17, 2019
23d4a39
Unique artifact names.
rolfbjarne Dec 17, 2019
d208ce6
Make the right name unique.
rolfbjarne Dec 17, 2019
165eb98
More progress
rolfbjarne Dec 18, 2019
c71a27d
Improvements
rolfbjarne Dec 18, 2019
6778ba5
Merge remote-tracking branch 'origin/master' into sample-test-statistics
rolfbjarne Dec 18, 2019
c66da8c
Don't need new maccore.
rolfbjarne Dec 18, 2019
cb0c22d
cleanup
rolfbjarne Dec 18, 2019
f9116aa
Remove debug spew.
rolfbjarne Dec 18, 2019
d68e506
Realign stuff.
rolfbjarne Dec 18, 2019
5783e35
duh
rolfbjarne Dec 18, 2019
6bb1887
More path fixes.
rolfbjarne Dec 18, 2019
9de7197
zippity zip.
rolfbjarne Dec 18, 2019
c01ee8e
Show publishing errors.
rolfbjarne Dec 18, 2019
6067093
dependencies
rolfbjarne Dec 18, 2019
21381ed
Not fake results anymore.
rolfbjarne Dec 18, 2019
9557386
Merge remote-tracking branch 'origin/master' into sample-test-statistics
rolfbjarne Dec 18, 2019
788556b
Tweaks
rolfbjarne Dec 18, 2019
1b847a1
Merge xml files
rolfbjarne Dec 19, 2019
b9c03c5
[sampletester] Bump nuget timeout to 5 minutes.
rolfbjarne Dec 19, 2019
be8f77b
Improvements.
rolfbjarne Dec 19, 2019
9642518
Fix glob.
rolfbjarne Dec 19, 2019
328b7f6
[sampletester] Fix fetching of sample repository and hash.
rolfbjarne Dec 20, 2019
7096bee
[sampletester] Centralize verbosity for mtouch and mmp.
rolfbjarne Dec 20, 2019
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
28 changes: 28 additions & 0 deletions tests/sampletester/BaselineTest/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Foundation;
using UIKit;

namespace BaselineTest {
[Register ("AppDelegate")]
public class AppDelegate : UIResponder, IUIApplicationDelegate {
UIWindow window;
UIViewController vc;

[Export ("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
vc = new UIViewController ();
vc.View.BackgroundColor = UIColor.Green;
window.RootViewController = vc;
window.MakeKeyAndVisible ();

return true;
}

static void Main (string [] args)
{
UIApplication.Main (args, null, typeof (AppDelegate));
}
}
}

72 changes: 72 additions & 0 deletions tests/sampletester/BaselineTest/BaselineTest.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProjectGuid>{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{edc1b0fa-90cd-4038-8fad-98fe74adb368}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>BaselineTest</RootNamespace>
<AssemblyName>BaselineTest</AssemblyName>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<ItemGroup>
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project>
23 changes: 23 additions & 0 deletions tests/sampletester/BaselineTest/BaselineTest.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaselineTest", "BaselineTest.csproj", "{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Debug|iPhone.ActiveCfg = Debug|iPhone
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Debug|iPhone.Build.0 = Debug|iPhone
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Release|iPhone.ActiveCfg = Release|iPhone
{E7E76A89-6DB7-4CF6-953C-6D9ADC656C6F}.Release|iPhone.Build.0 = Release|iPhone
EndGlobalSection
EndGlobal
48 changes: 48 additions & 0 deletions tests/sampletester/BaselineTest/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>BaselineTest</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.BaselineTest</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>CFBundleName</key>
<string>BaselineTest</string>
</dict>
</plist>
27 changes: 27 additions & 0 deletions tests/sampletester/BaselineTest/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS" />
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530" />
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb" />
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="53" y="375" />
</scene>
</scenes>
</document>
52 changes: 52 additions & 0 deletions tests/sampletester/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,57 @@ static void CreateGlobalConfig (string root)
}
");
}

static string tested_hash;
public static string TestedHash {
get {
lock (lock_obj) {
if (tested_hash != null)
return tested_hash;

tested_hash = GetCurrentHash (Environment.CurrentDirectory);
return tested_hash;
}
}
}

public static string GetCurrentHash (string directory)
{
return ProcessHelper.RunProcess ("git", "log -1 --pretty=%H", directory).Trim ();
}

public static string GetCurrentRemoteUrl (string directory)
{
return ProcessHelper.RunProcess ("git", "remote get-url origin", directory).Trim ();
}

static string mono_version;
public static string MonoVersion {
get {
lock (lock_obj) {
if (mono_version != null)
return mono_version;

// We only care about the first line
mono_version = ProcessHelper.RunProcess ("mono", "--version").Split (new char [] { '\n' }, StringSplitOptions.RemoveEmptyEntries) [0].Trim ();
}

return mono_version;
}
}

static string sw_version;
public static string OSVersion {
get {
lock (lock_obj) {
if (sw_version != null)
return sw_version;

sw_version = ProcessHelper.RunProcess ("sw_vers").Replace ('\n', ';').Replace ((char) 9, ' ');
}

return sw_version;
}
}
}
}
Loading