Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Time Series generator #14

Open
youen opened this issue Apr 18, 2021 · 0 comments
Open

[PROPOSAL] Time Series generator #14

youen opened this issue Apr 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@youen
Copy link
Member

youen commented Apr 18, 2021

Time series generator

This issue is a proposal to generate and simulate time serie from a set of sensors.

Time series generator configuration

Simple configuration to generate time serie with a period of 5 seconds from 2012-04-23T18:25:00.000Z to 2012-04-23T18:25:15.000Z.

masks:
  - selector:
      jsonpath : 'timestamp'
      mask: 
        timeserie:
          period: "5s" # 1s by default
          from: "2012-04-23T18:25:00.000Z"  # current time by default
          to: "2012-04-23T18:25:15.000Z" # empty by default that mean endless time serie generator         

The following command generate timeserie dataset

$ echo '{"timestamp": "" }' |  pimo
{"timestamp": "2012-04-23T18:25:00.000Z" }
{"timestamp": "2012-04-23T18:25:05.000Z" }
{"timestamp": "2012-04-23T18:25:10.000Z" }

Multi-Sensors configuration

Timeserie mask is not streamable. It start to generate data after the close of the input stream. Each input line is a sensor configuration and timeserie mask generate data for each sensors.

$ echo '{ "id": 1, "timestamp": "" }\n'{"id": 2, "timestamp": "" }' |  pimo
{"id": 1, "timestamp": "2012-04-23T18:25:00.000Z" }
{"id": 2, "timestamp": "2012-04-23T18:25:00.000Z" }
{"id": 1, "timestamp": "2012-04-23T18:25:05.000Z" }
{"id": 2, "timestamp": "2012-04-23T18:25:05.000Z" }
{"id": 1, "timestamp": "2012-04-23T18:25:10.000Z" }
{"id": 2, "timestamp": "2012-04-23T18:25:10.000Z" }

Time Serie simulation

If the simulate option is activating timeserie wait for the period between each data generation.

masks:
  - selector:
      jsonpath : 'timestamp'
      mask: 
        timeserie:
          period: "5s" # 1s by default
          from: "2012-04-23T18:25:00.000Z"  # current time by default
          to: "2012-04-23T18:25:15.000Z" # empty by default that mean endless time serie generator    
          simulate: true # false by default     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant