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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 318093002: Convert timestamp to milliseconds when creating TracingModel.Event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 target: function() 530 target: function()
531 { 531 {
532 return this._model.target(); 532 return this._model.target();
533 }, 533 },
534 534
535 /** 535 /**
536 * @return {number} 536 * @return {number}
537 */ 537 */
538 selfTime: function() 538 selfTime: function()
539 { 539 {
540 return this._event.selfTime / 1000; 540 return this._event.selfTime;
541 }, 541 },
542 542
543 /** 543 /**
544 * @return {!Array.<!WebInspector.TimelineModel.Record>} 544 * @return {!Array.<!WebInspector.TimelineModel.Record>}
545 */ 545 */
546 children: function() 546 children: function()
547 { 547 {
548 return this._children; 548 return this._children;
549 }, 549 },
550 550
(...skipping 12 matching lines...) Expand all
563 title: function() 563 title: function()
564 { 564 {
565 return WebInspector.TimelineUIUtils.recordTitle(this, this._model); 565 return WebInspector.TimelineUIUtils.recordTitle(this, this._model);
566 }, 566 },
567 567
568 /** 568 /**
569 * @return {number} 569 * @return {number}
570 */ 570 */
571 startTime: function() 571 startTime: function()
572 { 572 {
573 return this._event.startTime / 1000; 573 return this._event.startTime;
574 }, 574 },
575 575
576 /** 576 /**
577 * @return {string|undefined} 577 * @return {string|undefined}
578 */ 578 */
579 thread: function() 579 thread: function()
580 { 580 {
581 return "CPU"; 581 return "CPU";
582 }, 582 },
583 583
584 /** 584 /**
585 * @return {number} 585 * @return {number}
586 */ 586 */
587 endTime: function() 587 endTime: function()
588 { 588 {
589 return (this._event.endTime || this._event.startTime) / 1000; 589 return this._event.endTime || this._event.startTime;
590 }, 590 },
591 591
592 /** 592 /**
593 * @param {number} endTime 593 * @param {number} endTime
594 */ 594 */
595 setEndTime: function(endTime) 595 setEndTime: function(endTime)
596 { 596 {
597 throw new Error("Unsupported operation setEndTime"); 597 throw new Error("Unsupported operation setEndTime");
598 }, 598 },
599 599
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 function recordTimestampComparator(a, b) 750 function recordTimestampComparator(a, b)
751 { 751 {
752 // Never return 0, as the merge function will squash identical entri es. 752 // Never return 0, as the merge function will squash identical entri es.
753 return a.startTime() < b.startTime() ? -1 : 1; 753 return a.startTime() < b.startTime() ? -1 : 1;
754 } 754 }
755 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator); 755 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator);
756 this._backgroundRecordsBuffer = []; 756 this._backgroundRecordsBuffer = [];
757 return result; 757 return result;
758 } 758 }
759 } 759 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameModel.js ('k') | Source/devtools/front_end/timeline/TimelineTracingView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698