aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-04-05 15:27:27 +0200
committerBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2018-04-06 06:49:38 +0000
commitfa1fc5b7727f354ec40463537df03097fb41bab2 (patch)
tree9ebcb4a755fcbc493ea77754e891e9128e221eee
parent05eed267c65953fc85261b5b278b4addf40ae927 (diff)
[sysui] Display some startup timings
Task-number: QTAUTO-952 Change-Id: I4d265d35035b4134ba1ed03e0b4aa75afb03ed69 Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com> Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
-rw-r--r--imports/assets/translations/cs_CZ.ts23
-rw-r--r--imports/assets/translations/de_DE.ts23
-rw-r--r--imports/assets/translations/en_GB.ts23
-rw-r--r--imports/assets/translations/en_US.ts23
-rw-r--r--imports/assets/translations/ja_JP.ts23
-rw-r--r--imports/assets/translations/ko_KR.ts23
-rw-r--r--imports/assets/translations/zh_CN.ts23
-rw-r--r--sysui/about/About.qml7
-rw-r--r--sysui/about/AboutStartup.qml87
9 files changed, 255 insertions, 0 deletions
diff --git a/imports/assets/translations/cs_CZ.ts b/imports/assets/translations/cs_CZ.ts
index 0819be45..138a9e3c 100644
--- a/imports/assets/translations/cs_CZ.ts
+++ b/imports/assets/translations/cs_CZ.ts
@@ -33,6 +33,10 @@ UX na cestu</translation>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutPerformance</name>
@@ -77,6 +81,25 @@ UX na cestu</translation>
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/de_DE.ts b/imports/assets/translations/de_DE.ts
index e72171ef..322ce698 100644
--- a/imports/assets/translations/de_DE.ts
+++ b/imports/assets/translations/de_DE.ts
@@ -23,6 +23,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutPerformance</name>
@@ -67,6 +71,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/en_GB.ts b/imports/assets/translations/en_GB.ts
index 230ce952..77cd2567 100644
--- a/imports/assets/translations/en_GB.ts
+++ b/imports/assets/translations/en_GB.ts
@@ -15,6 +15,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutPerformance</name>
@@ -59,6 +63,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/en_US.ts b/imports/assets/translations/en_US.ts
index 3690e7a2..837d6e87 100644
--- a/imports/assets/translations/en_US.ts
+++ b/imports/assets/translations/en_US.ts
@@ -15,6 +15,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutPerformance</name>
@@ -59,6 +63,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/ja_JP.ts b/imports/assets/translations/ja_JP.ts
index 9ae3c852..f7c6f4f8 100644
--- a/imports/assets/translations/ja_JP.ts
+++ b/imports/assets/translations/ja_JP.ts
@@ -23,6 +23,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutPerformance</name>
@@ -67,6 +71,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/ko_KR.ts b/imports/assets/translations/ko_KR.ts
index 0c4f0911..207c1d50 100644
--- a/imports/assets/translations/ko_KR.ts
+++ b/imports/assets/translations/ko_KR.ts
@@ -23,6 +23,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutMarketing</name>
@@ -74,6 +78,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/imports/assets/translations/zh_CN.ts b/imports/assets/translations/zh_CN.ts
index b01eb7dd..2ef8b734 100644
--- a/imports/assets/translations/zh_CN.ts
+++ b/imports/assets/translations/zh_CN.ts
@@ -23,6 +23,10 @@
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Startup</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AboutMarketing</name>
@@ -74,6 +78,25 @@
</message>
</context>
<context>
+ <name>AboutStartup</name>
+ <message>
+ <source>Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Startup timings:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From boot to System UI process start: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>From System UI process start to first frame drawn: %1 ms</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>AddWidgetPopup</name>
<message>
<source>Add widget</source>
diff --git a/sysui/about/About.qml b/sysui/about/About.qml
index b662d059..8934ad45 100644
--- a/sysui/about/About.qml
+++ b/sysui/about/About.qml
@@ -94,6 +94,11 @@ NeptunePopup {
}
TabButton {
Layout.preferredWidth: Style.hspan(4)
+ text: qsTr("Startup")
+ property string name: "startup"
+ }
+ TabButton {
+ Layout.preferredWidth: Style.hspan(4)
text: qsTr("Running Apps")
property string name: "apps"
}
@@ -114,6 +119,8 @@ NeptunePopup {
currentIndex: tabBar.currentIndex
MonitorView {
}
+ AboutStartup {
+ }
AboutRunningApps {
applicationModel: root.applicationModel
}
diff --git a/sysui/about/AboutStartup.qml b/sysui/about/AboutStartup.qml
new file mode 100644
index 00000000..0fe3bd6d
--- /dev/null
+++ b/sysui/about/AboutStartup.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQml 2.2
+
+import com.pelagicore.styles.neptune 3.0
+import utils 1.0
+
+// TODO: Probably move this content to some other tab as there's not much going on here.
+// NB: StartupTimer is injected by qtapplicationmanager into the root context, so no import is needed.
+Item {
+ id: root
+
+ // TODO: Make sure this title here matches the size and layout of ones from other tabs
+ // If we're going to keep this tab in the first place, that is
+ Label {
+ id: title
+ anchors.top: parent.top
+ anchors.topMargin: NeptuneStyle.dp(20)
+ anchors.left: parent.left
+ anchors.right: parent.right
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("Startup timings:")
+ wrapMode: Text.Wrap
+ font.pixelSize: NeptuneStyle.fontSizeXL
+ font.bold: true
+ }
+
+ readonly property bool hasStartupData: StartupTimer.timeToFirstFrame > 0 && StartupTimer.systemUpTime > 0
+ Label {
+ id: upTimeLabel
+ anchors.top: title.bottom
+ anchors.topMargin: NeptuneStyle.dp(20)
+ anchors.left: parent.left
+ anchors.right: parent.right
+ text: qsTr("From boot to System UI process start: %1 ms")
+ .arg(Number(StartupTimer.systemUpTime).toLocaleString(Qt.locale(), 'f', 0))
+ visible: root.hasStartupData
+ }
+ Label {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: upTimeLabel.bottom
+ text: qsTr("From System UI process start to first frame drawn: %1 ms")
+ .arg(Number(StartupTimer.timeToFirstFrame).toLocaleString(Qt.locale(), 'f', 0))
+ visible: root.hasStartupData
+ }
+ Label {
+ anchors.top: title.bottom
+ anchors.topMargin: NeptuneStyle.dp(20)
+ anchors.left: parent.left
+ anchors.right: parent.right
+ text: qsTr("Startup timings not available. Make sure the environment variable AM_STARTUP_TIMER was set")
+ wrapMode: Text.Wrap
+ visible: !root.hasStartupData
+ }
+}