diff mbox

[i-g-t,3/4] trace.pl: Bring back timeline stacking

Message ID 20180719093601.11788-4-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin July 19, 2018, 9:36 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Bring back the button which expands/stacks overlapping timeline boxes.

We default to no stacking, but sometimes expanding the view can be useful,
especially with deep request pipelines.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 scripts/trace.pl | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

John Harrison July 27, 2018, 9:47 p.m. UTC | #1
On 7/19/2018 2:36 AM, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Bring back the button which expands/stacks overlapping timeline boxes.
>
> We default to no stacking, but sometimes expanding the view can be useful,
> especially with deep request pipelines.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   scripts/trace.pl | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/scripts/trace.pl b/scripts/trace.pl
> index 59f6d32dc3c8..1924333e12b6 100755
> --- a/scripts/trace.pl
> +++ b/scripts/trace.pl
> @@ -935,6 +935,7 @@ Boxes are in format 'ctx-id/seqno'.
>   <p>
>   Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline.
>   </p>
> +<button onclick="toggleStacking()">Toggle overlap stacking</button>
>   </td>
>   </tr>
>   </table>
> @@ -1284,6 +1285,12 @@ print <<ENDHTML;
>   
>     // Create a Timeline
>     var timeline = new vis.Timeline(container, items, groups, options);
> +
> +  function toggleStacking() {
> +	options.stack = !options.stack;
> +	options.stackSubgroups = !options.stackSubgroups;
> +	timeline.setOptions(options);
> +  }
>   ENDHTML
>   
>   print <<ENDHTML;

Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 7/19/2018 2:36 AM, Tvrtko Ursulin wrote:<br>
    <blockquote type="cite"
      cite="mid:20180719093601.11788-4-tvrtko.ursulin@linux.intel.com">
      <pre wrap="">From: Tvrtko Ursulin <a class="moz-txt-link-rfc2396E" href="mailto:tvrtko.ursulin@intel.com">&lt;tvrtko.ursulin@intel.com&gt;</a>

Bring back the button which expands/stacks overlapping timeline boxes.

We default to no stacking, but sometimes expanding the view can be useful,
especially with deep request pipelines.

Signed-off-by: Tvrtko Ursulin <a class="moz-txt-link-rfc2396E" href="mailto:tvrtko.ursulin@intel.com">&lt;tvrtko.ursulin@intel.com&gt;</a>
---
 scripts/trace.pl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index 59f6d32dc3c8..1924333e12b6 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -935,6 +935,7 @@ Boxes are in format 'ctx-id/seqno'.
 &lt;p&gt;
 Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline.
 &lt;/p&gt;
+&lt;button onclick="toggleStacking()"&gt;Toggle overlap stacking&lt;/button&gt;
 &lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
@@ -1284,6 +1285,12 @@ print &lt;&lt;ENDHTML;
 
   // Create a Timeline
   var timeline = new vis.Timeline(container, items, groups, options);
+
+  function toggleStacking() {
+	options.stack = !options.stack;
+	options.stackSubgroups = !options.stackSubgroups;
+	timeline.setOptions(options);
+  }
 ENDHTML
 
 print &lt;&lt;ENDHTML;
</pre>
    </blockquote>
    <br>
    Reviewed-by: John Harrison <a class="moz-txt-link-rfc2396E"
      href="mailto:John.C.Harrison@Intel.com">&lt;John.C.Harrison@Intel.com&gt;</a><br>
    <br>
  </body>
</html>
Tvrtko Ursulin Aug. 2, 2018, 10:38 a.m. UTC | #2
On 27/07/2018 22:47, John Harrison wrote:
> On 7/19/2018 2:36 AM, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin<tvrtko.ursulin@intel.com>
>>
>> Bring back the button which expands/stacks overlapping timeline boxes.
>>
>> We default to no stacking, but sometimes expanding the view can be useful,
>> especially with deep request pipelines.
>>
>> Signed-off-by: Tvrtko Ursulin<tvrtko.ursulin@intel.com>
>> ---
>>   scripts/trace.pl | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/scripts/trace.pl b/scripts/trace.pl
>> index 59f6d32dc3c8..1924333e12b6 100755
>> --- a/scripts/trace.pl
>> +++ b/scripts/trace.pl
>> @@ -935,6 +935,7 @@ Boxes are in format 'ctx-id/seqno'.
>>   <p>
>>   Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline.
>>   </p>
>> +<button onclick="toggleStacking()">Toggle overlap stacking</button>
>>   </td>
>>   </tr>
>>   </table>
>> @@ -1284,6 +1285,12 @@ print <<ENDHTML;
>>   
>>     // Create a Timeline
>>     var timeline = new vis.Timeline(container, items, groups, options);
>> +
>> +  function toggleStacking() {
>> +	options.stack = !options.stack;
>> +	options.stackSubgroups = !options.stackSubgroups;
>> +	timeline.setOptions(options);
>> +  }
>>   ENDHTML
>>   
>>   print <<ENDHTML;
> 
> Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

Pushed up to this one, thanks! (BTW this reply even patchwork did not 
see. But it saw your replies to 1 & 2.)

Regards,

Tvrtko
diff mbox

Patch

diff --git a/scripts/trace.pl b/scripts/trace.pl
index 59f6d32dc3c8..1924333e12b6 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -935,6 +935,7 @@  Boxes are in format 'ctx-id/seqno'.
 <p>
 Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline.
 </p>
+<button onclick="toggleStacking()">Toggle overlap stacking</button>
 </td>
 </tr>
 </table>
@@ -1284,6 +1285,12 @@  print <<ENDHTML;
 
   // Create a Timeline
   var timeline = new vis.Timeline(container, items, groups, options);
+
+  function toggleStacking() {
+	options.stack = !options.stack;
+	options.stackSubgroups = !options.stackSubgroups;
+	timeline.setOptions(options);
+  }
 ENDHTML
 
 print <<ENDHTML;