08 - Generate a results dashboard

update 29 aug 2024

Greenspector dashboard presents results for a better understanding. In particular, it calculates the Greenspector Ecoscore, a global note of a measured service.

It is also able to compares two versions of the same application, if the test journey has the same steps number and names.

Configuration

dashboardCampagne executable needs config.yml, definition.yml and ressources to generate the results dashboard. Ressources includes example, i18n, images, site and site_templates. Please verify all these elements.

  • Please download and move in dashboardCampagne’s folder these templates and modify them with following instructions:

Config file

cfgs: - name: "app" # Instance name url: "https://core-saas-prod.greenspector.com" # Instance URL token: [MYTOKEN] # User token

Please replace [MYTOKEN] with correct value.

Definition file

This file is quite long. We will describe it part by part.

Dashboard definition

First, we will define global settings for the generated dashboard, as name, language, audit type or measures units.

################################################################################## # Dashboard definition ################################################################################## name: Mesures Application # Report name env: app # Environment name to used (Related to config file) evolutiontype: comparaison # "comparaison" or "evolution" - Change the type of version tracking graphs generationtype: Dashboard # Optional - Default: "All" - "All", "Dashboard" or "Scenarios". Define which files will be generated basenetworktype: WIFI # Optional - Default: "WIFI" - "WIFI", "4G", "3G" or "2G". The main network used usembfordata: false # Optional - Replace KB by MB shouldgenerateevolutionperdomain: false # Optional - Default: false - Display evolution by domain pausedurationtouseforconsumption: 30.0 # Optional - Default: 30.0 - pause in second for step of type PAUSE (default: 30.0) language: EN # Optional - Language for the report: "FR" (default) or "EN" version: 2.0 # Optional - Default: 2.0 - "1.0" or "2.0" web: true # Optional - Default: false. For web measure, set true to change thresholds for data consumptions

Let default settings for this first try.

Measures

The second part links the dashboard generation with the measures stored in core-saas-prod.greenspector.com:

################################################################################## # Measurement campaign used to calculate Ecoscore ################################################################################## auditids: - version: v1.0.0 # Version name to display plateforme: Galaxy S9 # Platform name to display os: Android # "Android" or "iOS" idwifi: MYIDWIFI # ID of the WIFI audit id4g: # Optional - ID of 4G audit to compared network measure extramestime: 1.0 # float64 - Time in second added at the end of loading step. This time is not taken into account for the performance metric date: 07/12/2023 # Measure date to display

To identify MYIDWIFI, browse on core-saas-prod.greenspector.com. Select the right version in the list and copy the second number in the URL. It’s the id of audit.

Environmental impact

In addition to group and present the results, the dashboard offers a projection of environmental impact. In this part, precise settings to obtain a precise projection through the Greenspector impact algorithm.

For this quick test, let all these parameters by default.

Comparisons step by step

This part is only used to compare two versions of the same application. We won't go into that in this getting started, please find further information in Generate a results dashboard .

Steps definition

This last mandatory part defines which steps will be analysed.

For each step, detail which metric has to be taking into account or if this step is critical. For a clearer dashboard, a more readable name can be added.

Generate dashboard

To generate a first dashboard, run the following command:

  • Windows:

  • Linux - MacOS:

Web browser will open and show the dashboard in .html format.

Additionally, a .pdf file gets generated only on Linux.

Dashboard

In addition to the results dashboard, a second file with screenshots before and after each steps is also generated in HTLM and PDF formats. Please add the argument -screenshots=screenshots to dashboardCampaign command for this purpose.

Â