OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |