Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.

##################################################################################
# Environmental impact parameters (optional)
##################################################################################

environmentalinput:
  useroptions:
    userlocations:
      france: 20            # users in France
      world: 80             # users in World (except France)
    usertypes:
      smartphone: 50        # users on smartphone
      tablet: 30            # users on tablet
      pc: 20                # users on PC
  networkoptions:
    networklocations:
      france: 20            # users in France
      world: 80             # users in World (except France)
    networktypes:
      gsm2g3g: 4            # users in 2G/3G
      gsm4g5g: 15           # users in 4G/5G
      wiredfibre: 39        # users in fibre
      wiredxdsl: 42         # users in adsl/xdsl
  serveroptions:
    serverlocations:
      france: 20            # server in France
      world: 80             # server in world (except France)
    servertypes:
      complexserver: 70     # complex server
      simpleserver: 30      # simple server 

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.

  • 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.

##################################################################################
# Comparisons step by step with another measurement campaign (optional)
##################################################################################

comparisons:                # Used to compare all steps with each other
  metrics:                  # Metrics used for comparison
    - Performance
    - Data
    - EnergySpeed
    - EnergyConsumption
    - Carbon
  audits:
    - name: S9              # Name of the series to display
      id: 12345             # Audit id
      device: Galaxy S9     # Device name
      network: WIFI         # Optional - "WIFI"(default), "4G", "3G" ou "2G"
      extramestime: 1.0     # Time added at the end of loading steps. This time is not taken into account for the performance metric
    - [...]

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.

##################################################################################
# Definition of steps
##################################################################################

refname: "PAUSE_reference"
steps:
  - name: "PAUSE_reference"
    domain: Tech
  - name: "CHRGT_home"
    domain: Home
  - name: "PAUSE_home"
    domain: Home
  - name: "CHRGT_cookies"
    domain: Home
    # type: action        # Optional - Type of step. If not specified, the value depends on the acronym of the stage name. 
    # energy: true        # Optional - Step to use for energy. If not specified, the value depends on the type of step.
    # data: true          # Optional - Step to be used for data. If not specified, the value depends on the type of step.
    # performance: true   # Optional - Step to use for performance. If not specified, the value depends on the type of step.
    # order: 1            # Optional - Order used for the scenario report.
    # displayname:        # Optional - Name to be displayed in the report instead of the measurement name
    # critical: false     # Optional - Default: false. Can define the step as critical for the functional path.

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.

As seen in 06 - Discover GDSL test language, the steps are divided into 4 categories: CHRGT, PAUSE, ACTION, SCROLL, respectively for a load, a pause, an action and a scroll.

PAUSE steps are not taken into account in performance because they have a fixed duration.

Generate a dashboard

To generate a dashboard, run the following command:

  • Windows - Linux - MacOS:

dashboardcampagne -config=config.yml -definition=definition.yml -screenshots=screenshots

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

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

Even if the dashboardcampaign is not failing, be sure to check the logs. Non-fatal errors can occur.

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.

  • No labels