blob: cae417cc6be42904135ac1e7d1ae6d81d84cfc32 [file] [log] [blame]
<!DOCTYPE html>
<html>
<!--
Copyright (c) 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<head>
<title>LinuxPerfExynosParser tests</title>
<script src="base.js"></script>
</head>
<body>
<script>
'use strict';
base.require('unittest');
base.require('test_utils');
base.require('linux_perf_importer');
function testExynosImport() {
var lines = [
' X-945 [001] .... 113.995549: exynos_flip_request: ' +
'pipe=0',
' X-945 [001] .... 113.995561: exynos_flip_complete: ' +
'pipe=0'
];
var m = new tracing.TimelineModel(lines.join('\n'), false);
assertEquals(0, m.importErrors.length);
var threads = m.getAllThreads();
assertEquals(1, threads.length);
var gfxFlipThread = threads[0];
assertEquals('exynos_flip', gfxFlipThread.name);
assertEquals(1, gfxFlipThread.slices.length);
}
function testExynosBusfreqImport() {
var lines = [
' kworker/1:0-4177 [001] .... 2803.129806: ' +
'exynos_busfreq_target_int: frequency=200000',
' kworker/1:0-4177 [001] .... 2803.229207: ' +
'exynos_busfreq_target_int: frequency=267000',
' kworker/1:0-4177 [001] .... 2803.329031: ' +
'exynos_busfreq_target_int: frequency=160000',
' kworker/1:0-4177 [001] .... 2805.729039: ' +
'exynos_busfreq_target_mif: frequency=200000'
];
var m = new tracing.TimelineModel(lines.join('\n'), false);
assertEquals(0, m.importErrors.length);
var c0 = m.cpus[0];
assertEquals(0, c0.slices.length);
assertEquals(3, c0.counters['INT Frequency'].samples.length);
assertEquals(1, c0.counters['MIF Frequency'].samples.length);
}
</script>
</body>
</html>