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

Side by Side Diff: tracing/tracing/extras/importer/android/event_log_importer.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 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/importer/importer.html"> 8 <link rel="import" href="/tracing/importer/importer.html">
9 <link rel="import" href="/tracing/importer/simple_line_reader.html"> 9 <link rel="import" href="/tracing/importer/simple_line_reader.html">
10 <link rel="import" href="/tracing/model/activity.html"> 10 <link rel="import" href="/tracing/model/activity.html">
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 handleDestroyActivity: function(ts, activityName) { 189 handleDestroyActivity: function(ts, activityName) {
190 this.deleteActivity(activityName); 190 this.deleteActivity(activityName);
191 }, 191 },
192 192
193 addActivityToProcess: function(activity) { 193 addActivityToProcess: function(activity) {
194 if (activity.pid === undefined) 194 if (activity.pid === undefined)
195 return; 195 return;
196 var process = this.model_.getOrCreateProcess(activity.pid); 196 var process = this.model_.getOrCreateProcess(activity.pid);
197 // The range of the activity is the time from resume to time 197 // The range of the activity is the time from resume to time
198 // of pause; limit the start time to the beginning of the model 198 // of pause; limit the start time to the beginning of the model
199 var range = tr.b.Range.fromExplicitRange( 199 var range = tr.b.math.Range.fromExplicitRange(
200 Math.max(this.model_.bounds.min, activity.lastResumeTs), 200 Math.max(this.model_.bounds.min, activity.lastResumeTs),
201 activity.lastPauseTs); 201 activity.lastPauseTs);
202 var newActivity = new tr.model.Activity(activity.name, 202 var newActivity = new tr.model.Activity(activity.name,
203 'Android Activity', range, 203 'Android Activity', range,
204 {created: activity.createdTs, 204 {created: activity.createdTs,
205 procstart: activity.procStartTs, 205 procstart: activity.procStartTs,
206 lastfocus: activity.lastFocusedTs}); 206 lastfocus: activity.lastFocusedTs});
207 process.activities.push(newActivity); 207 process.activities.push(newActivity);
208 }, 208 },
209 209
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 }; 313 };
314 314
315 Importer.register(EventLogImporter); 315 Importer.register(EventLogImporter);
316 316
317 return { 317 return {
318 EventLogImporter, 318 EventLogImporter,
319 }; 319 };
320 }); 320 });
321 </script> 321 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/extras/cpu/cpu_usage_auditor.html ('k') | tracing/tracing/extras/importer/trace_code_map.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698