Skip to content

mystats binning produces inconsistent results #28

@apcarp

Description

@apcarp

While running more test with jlab_archiver_client, I noticed that the mystats output is inconsistent output for bins where there are no updates. It seems like the prior update event is not being propagated to the new bins correctly.

Using the bundled mycontainer you can see this issue across these three queries.

Interval data is available only on 2019-08-12 (~32k events)
http://localhost:8080/myquery/interval?c=channel1&b=2019-07-27&e=2019-09-01&l=&t=graphical&m=docker&f=&v=

MyStats data is null even after an update has occurred (last two mystats bins)
http://localhost:8080/myquery/mystats?c=channel1&b=2019-07-27&e=2019-09-01&n=5&m=docker&f=&v=

...
        {
          "begin": "2019-08-05T00:00:00",
          "eventCount": 0,
          "updateCount": 0,
          "duration": null,
          "integration": null,
          "max": null,
          "mean": null,
          "min": null,
          "rms": null,
          "stdev": null
        },
        {
          "begin": "2019-08-09T12:00:00",
          "eventCount": 32990,
          "updateCount": 32989,
          "duration": 86398.4720973968505859375,
          "integration": 6315429.949173429049551486968994140625,
          "max": 103.997,
          "mean": 73.0965,
          "min": 0,
          "rms": 79.9662,
          "stdev": 32.4267
        },
        {
          "begin": "2019-08-14T00:00:00",
          "eventCount": 0,
          "updateCount": 0,
          "duration": null,
          "integration": null,
          "max": null,
          "mean": null,
          "min": null,
          "rms": null,
          "stdev": null
        },
...

MyStats data is not null if only bins after the update has been queried.
http://localhost:8080/myquery/mystats?c=channel1&b=2019-08-17&e=2019-08-18&n=2&m=docker&f=&v=

{
  "channels": {
    "channel1": {
      "metadata": {
        "name": "channel1",
        "datatype": "DBR_DOUBLE",
        "datasize": 1,
        "datahost": "mya",
        "ioc": null,
        "active": true
      },
      "data": [
        {
          "begin": "2019-08-17T00:00:00",
          "eventCount": 2,
          "updateCount": 1,
          "duration": 43200,
          "integration": 4111763.1591796875,
          "max": 95.1797,
          "mean": 95.1797,
          "min": 95.1797,
          "rms": 95.1797,
          "stdev": 0
        },
        {
          "begin": "2019-08-17T12:00:00",
          "eventCount": 2,
          "updateCount": 1,
          "duration": 43200,
          "integration": 4111763.1591796875,
          "max": 95.1797,
          "mean": 95.1797,
          "min": 95.1797,
          "rms": 95.1797,
          "stdev": 0
        }
      ],
      "returnCount": 2
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions