After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644266 - perf: Add metrics for switching to the application tab
perf: Add metrics for switching to the application tab
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Colin Walters
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-09 00:40 UTC by Owen Taylor
Modified: 2011-03-12 00:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
viewSelector: allow programmatically switching to tabs (3.12 KB, patch)
2011-03-09 00:40 UTC, Owen Taylor
committed Details | Review
perf: Add metrics for switching to the application tab (3.24 KB, patch)
2011-03-09 00:40 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2011-03-09 00:40:21 UTC
Add metrics for how long it takes to switch to the application tab
Comment 1 Owen Taylor 2011-03-09 00:40:23 UTC
Created attachment 182909 [details] [review]
viewSelector: allow programmatically switching to tabs

Add the idea of an 'id' for a tab, and add a public switchTab method
so you can switch to 'applications' or 'windows'. This will be useful
for performance tests that test tab switching performance.
Comment 2 Owen Taylor 2011-03-09 00:40:26 UTC
Created attachment 182910 [details] [review]
perf: Add metrics for switching to the application tab

Measure how long it takes to switch from the windows tab to the
applications tab the first time and the second time.
Comment 3 drago01 2011-03-09 18:59:14 UTC
Review of attachment 182909 [details] [review]:

Looks good.

::: js/ui/viewSelector.js
@@ +86,3 @@
 
+    _init: function(id, label, pageActor, a11yIcon) {
+        this.id = id;

Not that it matters much but any reason why this is public? Doesn't seem to be accessed from outside of the class.
Comment 4 drago01 2011-03-09 19:01:53 UTC
Review of attachment 182910 [details] [review]:

Looks good modulo description inconsistency.

::: js/perf/core.js
@@ +69,3 @@
     Scripting.defineScriptEvent("afterShowHide", "After a show/hide cycle for the overview");
+    Scripting.defineScriptEvent("applicationsShowStart", "Starting to switch to application browser");
+    Scripting.defineScriptEvent("applicationsShowDone", "Done switching to application browser");

This is inconsistent with the above ... we should stick to either "application browser" or "applications tab" having to names for the same thing in the descriptions is kind of odd.
Comment 5 Owen Taylor 2011-03-11 20:39:45 UTC
(In reply to comment #3)
> Review of attachment 182909 [details] [review]:
> 
> Looks good.
> 
> ::: js/ui/viewSelector.js
> @@ +86,3 @@
> 
> +    _init: function(id, label, pageActor, a11yIcon) {
> +        this.id = id;
> 
> Not that it matters much but any reason why this is public? Doesn't seem to be
> accessed from outside of the class.

It is:

+        for (let i = 0; i < this._tabs.length; i++)
+            if (this._tabs[i].id == id) {
+                this._switchTab(this._tabs[i]);
+                break;
+            }
Comment 6 Owen Taylor 2011-03-11 20:43:20 UTC
(In reply to comment #4)
> Review of attachment 182910 [details] [review]:
> 
> Looks good modulo description inconsistency.
> 
> ::: js/perf/core.js
> @@ +69,3 @@
>      Scripting.defineScriptEvent("afterShowHide", "After a show/hide cycle for
> the overview");
> +    Scripting.defineScriptEvent("applicationsShowStart", "Starting to switch
> to application browser");
> +    Scripting.defineScriptEvent("applicationsShowDone", "Done switching to
> application browser");
> 
> This is inconsistent with the above ... we should stick to either "application
> browser" or "applications tab" having to names for the same thing in the
> descriptions is kind of odd.

Went with "applications view" for both, as closest to what we call it in the code.
Comment 7 Owen Taylor 2011-03-12 00:38:38 UTC
Attachment 182909 [details] pushed as d16acc4 - viewSelector: allow programmatically switching to tabs