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

Version 1 Current »

MAJ 31-01-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://app.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 app.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

Please replace MYIDWIFI with the following procedure.

To identify MYIDWIFI, browse on app.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.

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

environmentalinput:
  useroptions:
    userlocations:
      france: 20            # % users in france
      world: 80             # % users in another part of the world (outside 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 another part of the world (outside France)
    networktypes:
      gsm2g3g: 4            # % users in 2G/3G
      gsm4g5g: 15           # % users in 4G/5G
      wiredfibre: 39        # % users in fiber
      wiredxdsl: 42         # % users in adsl/xdsl
  serveroptions:
    serverlocations:
      france: 20            # % server in France
      world: 80             # % server in another part of the world (outside France)
    servertypes:
      complexserver: 70     # % complex server
      simpleserver: 30      # % simple server

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 .

##################################################################################
# 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
    - [...]

Steps definition

This last mandatory part defines which steps will be analysed.

##################################################################################
# Steps definition
##################################################################################

refname: "PAUSE_reference"
steps:
  - name: "PAUSE_reference"
    domain: Tech
  - name: "CHRGT_home"
    domain: Home
  - name: "PAUSE_home"
    domain: Home
  - name: "CHRGT_cookies"
    domain: Home     
    # energy: true        # Optional - Step to use for metric energy. If not set the value depends of the step type
    # data: true          # Optional - Step to use for metric data. If not set the value depends of the step type
    # performance: true   # Optional - Step to use for metric performance. If not set the value depends of the step type
    # order: 1            # Optional - Order used when building the scenario report
    # displayname:        # Optional - Name to display in report instead of the step name of the measure
    # critical: false     # Optional - Default: false. Can define the step as critical step of the fonctional path

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.

As seen in 06 - Discover GDSL test language, steps are divided in four type: CHRGT, PAUSE, ACTION, SCROLL, respectively for loading, pause, action and scroll.

PAUSE steps do not have to count in performance because they have a fixed duration.

Generate dashboard

To generate a first dashboard, run the following command:

  • Windows:

dashboardcampagne -config=config.yml -definition=definition.yml -screenshots=screenshots
  • Linux - MacOS:

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

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

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

Even if dashboardcampagne did not crash, please make sure to check the logs. Non fatal errors may occur.

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.

  • No labels