cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
465
Views
1
Helpful
1
Replies

Strange mean calculation on metric aggregation

HenrikH
Level 1
Level 1

I was playing around with the workspace metric API, and found the following:

 

For a device where the peopleCount was 1 for about 1 minute during an hour, I could get the individual values for that hour by using `aggregation: none` in the https://developer.webex.com/docs/api/v1/workspace-metrics/workspace-metrics request:

"items": [
    {
      "deviceId": "<my-workspace-id>",
      "timestamp": "2023-11-23T07:54:20.862Z",
      "value": 0
    },
    {
      "deviceId": "<my-workspace-id>",
      "timestamp": "2023-11-23T07:05:39.730Z",
      "value": 0
    },
    {
      "deviceId": "<my-workspace-id>",
      "timestamp": "2023-11-23T06:53:04.797Z",
      "value": 0
    },
    {
      "deviceId": "<my-workspace-id>",
      "timestamp": "2023-11-23T06:52:04.836Z",
      "value": 1
    },
    {
      "deviceId": "<my-workspace-id>",
      "timestamp": "2023-11-23T06:20:56.601Z",
      "value": 0
    },
    ...
]

From this I can see that for about one minute at 06:52:04Z, the peopleCount was 1, and then one minute later it went back to 0.

That matches my expected values.

However, if I choose "aggregation: hourly", I got an item for this particular hour that looked like this:

 

    {
      "start": "2023-11-23T06:00:00Z",
      "end": "2023-11-23T07:00:00Z",
      "mean": 1,
      "max": 1,
      "min": 1
    },

 This seems very strange to me. So for ONE minute during 60 minutes, there was 1 person, and for 59 minutes there were 0 persons.

How can the mean value be 1? It should be something like 1/60? 

1 Accepted Solution

Raffaele Lagana
Cisco Employee
Cisco Employee

It's possible that the test may have been too short to calculate accurate data. However, we will need to check this further. Can you please create a ticket (email to devsupport@webex.com) with this information so that we can analyse further. Thanks.

View solution in original post

1 Reply 1

Raffaele Lagana
Cisco Employee
Cisco Employee

It's possible that the test may have been too short to calculate accurate data. However, we will need to check this further. Can you please create a ticket (email to devsupport@webex.com) with this information so that we can analyse further. Thanks.