Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: tracing/tracing/model/cpu_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tracing/tracing/model/cpu_slice.html ('k') | tracing/tracing/model/device.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/range.html"> 8 <link rel="import" href="/tracing/base/math/range.html">
9 <link rel="import" href="/tracing/core/test_utils.html"> 9 <link rel="import" href="/tracing/core/test_utils.html">
10 <link rel="import" href="/tracing/model/model.html"> 10 <link rel="import" href="/tracing/model/model.html">
11 11
12 <script> 12 <script>
13 'use strict'; 13 'use strict';
14 14
15 tr.b.unittest.testSuite(function() { 15 tr.b.unittest.testSuite(function() {
16 var ColorScheme = tr.b.ColorScheme; 16 var ColorScheme = tr.b.ColorScheme;
17 var Cpu = tr.model.Cpu; 17 var Cpu = tr.model.Cpu;
18 var newThreadSlice = tr.c.TestUtils.newThreadSlice; 18 var newThreadSlice = tr.c.TestUtils.newThreadSlice;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 var powerCounter = cpu.getOrCreateCounter('', 'Clock Frequency'); 184 var powerCounter = cpu.getOrCreateCounter('', 'Clock Frequency');
185 var series = powerCounter.addSeries(new tr.model.CounterSeries('state', 185 var series = powerCounter.addSeries(new tr.model.CounterSeries('state',
186 ColorScheme.getColorIdForGeneralPurposeString('test'))); 186 ColorScheme.getColorIdForGeneralPurposeString('test')));
187 187
188 series.addCounterSample(0, 100000); 188 series.addCounterSample(0, 100000);
189 series.addCounterSample(20, 300000); 189 series.addCounterSample(20, 300000);
190 series.addCounterSample(30, 100000); 190 series.addCounterSample(30, 100000);
191 series.addCounterSample(80, 500000); 191 series.addCounterSample(80, 500000);
192 series.addCounterSample(100, 300000); 192 series.addCounterSample(100, 300000);
193 193
194 var range = tr.b.Range.fromExplicitRange(10, 90); 194 var range = tr.b.math.Range.fromExplicitRange(10, 90);
195 var stats = cpu.getFreqStatsForRange(range); 195 var stats = cpu.getFreqStatsForRange(range);
196 assert.equal(stats[100000], 60); 196 assert.equal(stats[100000], 60);
197 assert.equal(stats[300000], 10); 197 assert.equal(stats[300000], 10);
198 assert.equal(stats[500000], 10); 198 assert.equal(stats[500000], 10);
199 }); 199 });
200 }); 200 });
201 </script> 201 </script>
202 202
OLDNEW
« no previous file with comments | « tracing/tracing/model/cpu_slice.html ('k') | tracing/tracing/model/device.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698