3,072
edits
Efernandez (talk | contribs) |
Efernandez (talk | contribs) |
||
Line 129: | Line 129: | ||
The detections field is an array with the object ID, its position and its direction vector. | The detections field is an array with the object ID, its position and its direction vector. | ||
With this information, the services is constantly generating the following statistics: | |||
*'''Redis:''' | |||
**'''Engagement:''' This is a redis message with key '''<personid>:engagement''' and content '''{engaged:<int 0/1 indicating if the person is engaged>, engagement:<engagement in seconds>,"last-seen":<time when the person was last seen>}'''. The messages are posted in redis with an expiration time ('''message_expiration''' field in configuration) so they will disappear if not updated (the person hasn't been seen) for the given time. | |||
**'''Heatmap:''' Heatmap of engaged people over a configrable period of time ('''heatmap->window_seconfs''' in configuration). This message uses the '''HeatmapSchemaGenerator''' from [https://github.com/RidgeRun/rrms-utils rrms-utils] and has the following format: '''"heatmap":[{"position":{"x":int, "y": int}, "intensity":float, "radius": int}, {"position":{"x":int, "y": int}, "intensity":float, "radius": int}, ...]''' | |||
*'''InfluxDB:''' InfluxDB is used for the data monitoring service so here is where the monitored statistics are posted. All influx data is stored in a bucket called jetson_metrics in Ridgerun organization. The following data is stored: | |||
**'''engagement_metrics:''' This is a measurement used to store the following engagement related metrics: | |||
***'''detected_people:''' The amount of people that has been detected. | |||
***'''total_engaged_people:''' The amount of people that has been engaged. | |||
***'''total_engagement:''' The total amount of engagement in seconds. | |||
***'''total_seconds:''' The amount of seconds the service has been running collecting statistics. | |||
**'''Engaged persons:''' This measurement is used to report the amount of persons engaged per hour. It used the following field: '''{persons: <number of persons>}''' | |||
**'''Engagement:''' This measurement is used to report 2 statistics using 2 different tags: average to report the average engagement and by hour to report the engagement per hour. The engagement is reported in a filed '''{engagement: <engagement time in seconds>}''' | |||
**'''Real Time:''' This measurement is used to report real time data. The data is collected in a window of time equals to db_update_period in configutation. It has the following fields: | |||
***'''detected_people:''' Amount of unique persons detected in the time window. | |||
***'''engaged_people:''' Amount of people engaged in the time window. | |||
***'''engagement_time:''' The total engagement time in the time window. This is, the sum of the engagement time of all the engaged people. | |||
***'''person_id:''' This field is used to report the detected IDs. It is sent with the detections tag if it is a regular detection (not engaged) and with the engaged tag if the id is engaged. | |||
== Running the Service == | == Running the Service == |