diff options
Diffstat (limited to 'examples/applicationmanager/monitor/doc/src/monitor.qdoc')
-rw-r--r-- | examples/applicationmanager/monitor/doc/src/monitor.qdoc | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/examples/applicationmanager/monitor/doc/src/monitor.qdoc b/examples/applicationmanager/monitor/doc/src/monitor.qdoc deleted file mode 100644 index 5fc0faa3..00000000 --- a/examples/applicationmanager/monitor/doc/src/monitor.qdoc +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 Pelagicore AG -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Pelagicore Application Manager. -** -** $QT_BEGIN_LICENSE:FDL-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 Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - -\example applicationmanager/monitor -\title Performance Monitoring Example -\image monitor.png Screenshot -\brief A resource and performance monitor. -\ingroup applicationmanager-examples - -\section1 Introduction - -This example shows the basic usage of system and process monitoring APIs offered by the -application-manager: - \list - \li SystemMonitor - \li ProcessMonitor - \endlist - -The example monitors performance (frame rate), as well as rescource usage (memory and CPU). - -\section2 Invocation -The example can be started from within the "monitor" folder with: -\badcode -path/to/bin/appman -c am-config.yaml -\endcode - -\note The application-manager attempts to register a \c freedesktop.org compliant notification -server. DBus errors might occur if it conflicts with the server running on the host desktop -environment. In this case, a private session bus needs to be started by adding the -\c --start-session-dbus option. - -\section1 Walkthrough - -We will start from the bottom, because this is the essential part. - -\section2 SystemMonitor and ProcessMonitor Usage - -\quotefromfile applicationmanager/monitor/system-ui/main.qml -\skipto ProcessMonitor -\printuntil ApplicationManager.application(0).start() -\printline } -The ProcessMonitor will monitor the process that is associated with -its \l {ProcessMonitor::applicationId}{applicationId} property. An empty applicationId string means -that the System-UI process is monitored. By clicking the "Switch Process" button, the monitored -process can be changed to the \c tld.monitor.app application. Measurements will be performed each -second (1000 ms) and 12 reading points will be kept in the model (ProcessMonitor is a model). -The model is used below to display the bar charts. - -Memory and frame rate reporting need to be enabled, since we are interested in both. For frame rate -measurements the list of \c monitoredWindows has to be filled with windows that we are interested -in. For the System-UI this is the single root window itself and for the tld.monitor.app process it -is the currently selected window. Hence the list will always include just one element. The memory -and frame rate changed signal handlers will update the current values of the corresponding views. - -The Connections type is used to implement signal handlers for the property changes of the -SystemMonitor. The current values of the corresponding views are updated, as well. - -For the SystemMonitor, like above, measurements will be performed each second (1000 ms) and -12 reading points will be kept in the model (the SystemMonitor is a model, as well). - -The very last line will start the only application that is provided by this example. Note that, if -the application-manager is running in single-process mode, the application will run within the -System-UI process and consequently the ProcessMonitor will not report anything and the associated -ProcessMonitor::processId will be set to 0. - -\section2 The User Interface - -\quotefromfile applicationmanager/monitor/system-ui/main.qml -\skipto import Qt -\printto ProcessMonitor -\dots - -We won't go into much detail, because it's rather conventional QML code. The MonitorChart is a -ListView that uses either an instance of a ProcessMonitor or the SystemMonitor singleton as its -model. The reading values are represented as bars. Their height is determined by the -corresponding model role, e.g. for the PSS memory consumption it is \c memoryPss.total. - -When the tld.monitor.app process is monitored, its two windows will be shown (primary and -secondary). The window that is monitored in terms of frame rate can be selected and is highlighted -with a white border. - -*/ |