Commit a5f0f8e2 authored by Zeynep Cankara's avatar Zeynep Cankara Committed by Commit Bot

[tools][system-analyzer] Align Timeline Track Scales

This CL aligns the timeline tracks by tracking
the global start and end timestamps of both
Map and IC events.

Bug: v8:10644, v8:10735

Change-Id: Ib0ad086cdcb8ae3ae734df6480c5567f1f5125c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335183Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#69242}
parent 3927c9c4
......@@ -10,14 +10,32 @@ class State {
#chunks;
#icTimeline;
#mapTimeline;
#minStartTime = Number.POSITIVE_INFINITY;
#maxEndTime = Number.NEGATIVE_INFINITY;
get minStartTime(){
return this.#minStartTime;
}
get maxEndTime(){
return this.#maxEndTime;
}
#updateTimeRange(timeline){
this.#minStartTime = Math.min(this.#minStartTime, timeline.startTime);
this.#maxEndTime = Math.max(this.#maxEndTime, timeline.endTime);
}
get mapTimeline(){
return this.#mapTimeline;
}
set mapTimeline(value){
this.#mapTimeline = value;
set mapTimeline(timeline){
this.#updateTimeRange(timeline);
timeline.startTime = this.#minStartTime;
timeline.endTime = this.#maxEndTime;
this.#mapTimeline = timeline;
}
set icTimeline(value){
this.#icTimeline = value;
set icTimeline(timeline){
this.#updateTimeRange(timeline);
timeline.startTime = this.#minStartTime;
timeline.endTime = this.#maxEndTime;
this.#icTimeline = timeline;
}
get icTimeline(){
return this.#icTimeline;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment