Commit 45c6d648 authored by Combava Orange's avatar Combava Orange Committed by Jujube Orange
Browse files

added statistiques

parent 3acb343a
Pipeline #326903 passed with stages
in 43 minutes and 23 seconds
......@@ -67,12 +67,13 @@ If the transfert fails (ElasticSearch not available), clea-ws constantly tries t
Each valid decrypted visit is recorded in ElasticSearch (without locationTemporaryPublicId).
Document sent to ElasticSearch is:
- qrCodeScanTime : TODO / Trunc by ExposureTimeE property.
- venueType
- venueCategory1
- venueCategory2
- backward: 0/1
- forward: 0/1
- qrCodeScanTime : scan date truncated per statistic slot duration (property clea.conf.statSlotDurationInSeconds)
A statistic Slot can be different from a cluster slot.
- venueType (int): a location type (ex restaurant)
- venueCategory1: a caracteristic for the location (ex number of client)
- venueCategory2: a caracteristic for the location (ex surface)
- backward: Number of backward visits received for the same period and location type (type,categ1/categ2)
- forward: Number of forward visits received for the same period and location type
After 14 days (retention date), we save an aggregate sum of backward and forward visits per period (1/2 hours),
and the detailed documents are removed from Elasticsearch.
......@@ -39,7 +39,8 @@ the mobile application determines a pivot date of contagiousness.
The structure received by this module is:
- pivotDateAsNtpTimestamp : pivotDate as NTP Timestamp
- pivotDateAsNtpTimestamp : pivotDate as NTP Timestamp. It pivot date is less than now - property clea.conf.retentionDurationInDays days, then
the pivot date used to detect backward or forward visits will be (now - property clea.conf.retentionDurationInDays days)
- An array of visits composed of:
. qrCodeScanTime : date of scan as NTP Timestamp
......@@ -65,9 +66,19 @@ The data model pushed to Kafka is:
### Statistiques
Duplicate : Same LocationId in less than 30''
isClosed: 2 scan for 2 locations.
isClosed Après duplicated qui a la même durée que exposureTimePeriod.
This module a row of statistics for each report to a dedicated Kafka topic.
the data model used for each report is:
- timestamp (long): time the report was received as an NTP Timestamp.
- reported (int): number of visits reported in the report
- rejected (int): the causes of the rejections are:
- outdate : number of days between now and visit.qrCodeScanTime > property clea.conf.retentionDurationInDays (14 days by default)
- future: visit.qrCodeScanTime > now.
- duplicated scan: For the same LocationId, a second scan take place before property clea.conf.duplicateScanThresholdInSeconds (1800 sec/ 30 minutes)
- backwards (int): visit.qrCodeScanTime < pivotDate
- forwards (int): visit.qrCodeScanTime >= pivotDate
- close (int): count of non-rejected visits, those with a different locationTemporaryPublicId and a scan date interval less than the duration of a slot (property clea.conf.exposureTimeUnitInSeconds 1800sec/30 min by default)
### Security
......@@ -86,20 +97,22 @@ Build clea-server project to build all the modules.
This module is an uber-jar. You can use this command to execute it:
java -jar target/clea-ws-rest*-exec.jar
java -jar target/clea-ws-rest*-exec.jar
This module can be executed by maven:
mvn spring-boot:run
$ docker build -t tac/clea-ws-rest:latest .
$ docker run -it --rm --name clea-ws-rest -p 8080:8080 clea-ws-rest:latest,docker
This application can be packaged as Container image then executed :
the docker-compose.yml at the root of clea-server execute this service
$ docker build -t tac/clea-ws-rest:latest .
$ docker run -it --rm --name clea-ws-rest -p 8080:8080 clea-ws-rest:latest,docker
$ docker-compose up
$ docker-compose up clea-ws-rest
Display the Clea API and use it: http://localhost:8080/swagger-ui/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment