Generate a results dashboard

The Greenspector dashboard presents the results for better understanding. In particular, it calculates the Greenspector Ecoscore, a gobal score for the service measured.

It can also compare 2 versions of the same application, if the user path has the same number of steps and the same step names.

Configuration

The executable dashboardCampagne needs config.yml, definition.yml and resources to generate the results dashboard. Resources include example, i18n, images, site et site_templates. Check all these elements.

  • Download and place them in the folder where the dashboardCampagne and modify them using the following instructions:

Config file

cfgs: - name: "core-saas" # Instance name url: "https://core-saas-prod.greenspector.com" # URL de l'instance token: [MYTOKEN] # User Token

Replace [MYTOKEN] with appropriate value.

Definition file

Definition of dashboard

First, we will define the global parameters of the dashboard to be generated: name, language, type of audit or units of measurement.

################################################################################## # Dashboard definition ################################################################################## name: Application Measures # Report name env: app # Environment name to use (Relative to the config file) evolutiontype: comparaison # "comparaison" or "evolution" - Change the type of graphs version generationtype: Dashboard # Optional - Default: "All" - "All", "Dashboard" or "Scenarios". Defines which files will be generated basenetworktype: WIFI # Optional - Default: "WIFI" - "WIFI", "4G", "3G" or "2G". The network used during the measurements usembfordata: false # Optional - Replace Kb par Mb shouldgenerateevolutionperdomain: false # Optional - Default: false - Display evolution by domain pausedurationtouseforconsumption: 30.0 # Optional - Default: 30.0 - pause in seconds for a PAUSE step (default: 30.0) language: EN # Optional - Report language: "FR" (default) or "EN" version: 2.0 # Optional - Default: 2.0 - "1.0" or "2.0" or "2.1" web: true # Optional - Default: false. For web measurements, enter true to change the data consumption thresholds

Measures

The second part links the generation of the dashboard with the measurements stored in the Workshop:

################################################################################## # Measurement campaign used to calculate the Ecoscore ################################################################################## auditids: - version: v1.0.0 # Version name to display plateforme: Galaxy S9 # Name of the platform displayed in Core SaaS Greenspector os: Android # "Android" or "iOS" idwifi: [MYIDWIFI] # WIFI audit ID id4g: # Optional - 4G audit ID to compare network measurements (or id3g for 3G measurements) extramestime: 1.0 # float64 - Time in seconds added at the end of the loading steps. This time is not taken into account for the performance metric. date: 07/12/2023 # Measurement date to display

Replace [MYIDWIFI] using the following procedure.

To identify MYIDWIFI, go on the Workshop. Select the correct version from the list and copy the second number into the URL. This is the audit ID.

image-20231213-092010.png

Environmental impact

As well as grouping and presenting the results, the dashboard provides a projection of the environmental impact. In this section, specify the parameters to obtain an accurate projection using our Greenspector impact model.

The sum of each distribution must equal 100.

The server type parameter (servertypes) is used to estimate the server impact.

  • Simple server allows you to model infrastructures with a maximum of 2 VMs or containers (e.g. a front and a backend), not including third-party services.

    • For example : a VM for the front and another for the backend.

  • Complex server is used to model the rest.

Complex server is therefore set to 100% if the infrastructure has more than 2 VMs/containers.

Comparisons step by step

This part is only used to compare two versions of the same application.

The group metrics lists the metrics on which versions of the same application will be compared. Comment out the metrics whose comparison does not need to be displayed in the dashboard.

The group audits includes all the versions to be compared.

Definition of steps

This last mandatory part defines which steps will be analysed.

For each step, detail which metrics need to be taken into account or whether this step is critical. For a clear dashboard, a more legible step name can be used.

Generate a dashboard

To generate a dashboard, run the following command:

  • Windows - Linux - MacOS:

The web browser will open and display the dashboard in .html.

In addition, a .pdf file is only generated on Linux.

image-20231207-103006.png

In addition to the results dashboard, a second file with before and after screenshots is also generated in HTML and PDF format. Add the argument -screenshots=screenshots to the command dashboardCampaign to have this functionality.


PDF export

If wkhtmltopdf is installed, a PDF export will be automatically generated from the HTML file.

If ghostscript is installed, the pdf will be automatically compressed.

Â