Performance test pages

This commit is contained in:
vakrilov
2015-05-22 18:07:47 +03:00
parent 27b38da248
commit 3b8e27ef35
7 changed files with 109 additions and 0 deletions

View File

@@ -128,6 +128,9 @@
<TypeScriptCompile Include="apps\tests\layouts\dock-layout-tests.ts" />
<TypeScriptCompile Include="apps\tests\pages\app.ts" />
<TypeScriptCompile Include="apps\tests\pages\file-load-test.ts" />
<TypeScriptCompile Include="apps\tests\pages\page-load-performance\start.ts" />
<TypeScriptCompile Include="apps\tests\pages\page-load-performance\test-big.ts" />
<TypeScriptCompile Include="apps\tests\pages\page-load-performance\test-small.ts" />
<TypeScriptCompile Include="apps\tests\pages\page12.ts" />
<TypeScriptCompile Include="apps\tests\layouts\absolute-layout-tests.ts" />
<TypeScriptCompile Include="apps\tests\layouts\layout-helper.ts" />
@@ -609,6 +612,13 @@
<Content Include="apps\TelerikNEXT\images\background.jpg" />
<Content Include="apps\template-settings\app.css" />
<Content Include="apps\tests\app\location-example.xml" />
<Content Include="apps\tests\pages\page-load-performance\start.xml">
<SubType>Designer</SubType>
</Content>
<Content Include="apps\tests\pages\page-load-performance\test-big.xml">
<SubType>Designer</SubType>
</Content>
<Content Include="apps\tests\pages\page-load-performance\test-small.xml" />
<Content Include="apps\tests\pages\page18.xml" />
<Content Include="apps\tests\ui\bindingContext_testPage.xml" />
<Content Include="apps\tests\ui\bindingContext_testPage1.xml" />

View File

@@ -0,0 +1,12 @@
import frame = require("ui/frame");
import observable = require("data/observable");
declare function __startCPUProfiler(name: string);
export function navigate(args: observable.EventData) {
var tag = "" + args.object.get("tag");
__startCPUProfiler("xml-performance-" + tag);
frame.topmost().navigate({
moduleName: tag,
});
}

View File

@@ -0,0 +1,7 @@
<Page loaded="pageLoaded" >
<StackLayout>
<Button text="test small" tag="test-small" tap="navigate" />
<Button text="test big" tag="test-big" tap="navigate" />
<Button text="telerik next session" tag="telerik-next-session" tap="navigate" />
</StackLayout>
</Page>

View File

@@ -0,0 +1,7 @@
import observable = require("data/observable");
declare function __stopCPUProfiler(name: string);
export function pageLoaded(args: observable.EventData) {
__stopCPUProfiler("xml-performance-test-big");
}

View File

@@ -0,0 +1,54 @@
<Page loaded="pageLoaded" unloaded="pageUnloaded" backgroundColor="red">
<StackLayout>
<StackLayout>
<Button text="1button1" />
<Button text="1button2" />
<Button text="1button3" />
<Button text="1button4" />
<Button text="1button5" />
<Button text="1button6" />
<Button text="1button7" />
<Button text="1button8" />
</StackLayout>
<StackLayout>
<Button text="2button1" />
<Button text="2button2" />
<Button text="2button3" />
<Button text="2button4" />
<Button text="2button5" />
<Button text="2button6" />
<Button text="2button7" />
<Button text="2button8" />
</StackLayout>
<StackLayout>
<Button text="3button1" />
<Button text="3button2" />
<Button text="3button3" />
<Button text="3button4" />
<Button text="3button5" />
<Button text="3button6" />
<Button text="3button7" />
<Button text="3button8" />
</StackLayout>
<StackLayout>
<Button text="4button1" />
<Button text="4button2" />
<Button text="4button3" />
<Button text="4button4" />
<Button text="4button5" />
<Button text="4button6" />
<Button text="4button7" />
<Button text="4button8" />
</StackLayout>
<StackLayout>
<Button text="5button1" />
<Button text="5button2" />
<Button text="5button3" />
<Button text="5button4" />
<Button text="5button5" />
<Button text="5button6" />
<Button text="5button7" />
<Button text="5button8" />
</StackLayout>
</StackLayout>
</Page>

View File

@@ -0,0 +1,7 @@
import observable = require("data/observable");
declare function __stopCPUProfiler(name: string);
export function pageLoaded(args: observable.EventData) {
__stopCPUProfiler("xml-performance-test-small");
}

View File

@@ -0,0 +1,12 @@
<Page loaded="pageLoaded" unloaded="pageUnloaded" backgroundColor="green">
<StackLayout>
<Button text="button1" />
<Button text="button2" />
<Button text="button3" />
<Button text="button4" />
<Button text="button5" />
<Button text="button6" />
<Button text="button7" />
<Button text="button8" />
</StackLayout>
</Page>