Skip to content

Conversation

@bhufmann
Copy link
Contributor

@bhufmann bhufmann commented Oct 2, 2025

This was incorrectly specified and didn't match the implementation.

Related issue:
#236

What it does

  • Update swagger definition of SeriesModel
  • Rename StartEndRange to Range (swagger)
  • Provide 3 fields for x values: xValues, xCategories and xRanges for the 3 sampling use cases.
  • Update serializers for SeriesModel and Sampling
  • Update unit tests for this

How to test

  • Verify that API spec (swagger) and implementation match. Use unit tests XyDataProviderServiceTest and GenericXYDataProviderServiceTest for that.
  • Send http requests (e.g. with curl) to xy endpoint (histogram) and generic xy (Function Density View for LTTng UST with callstack) and check JSON reply.

Follow-ups

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Siwei Zhang and others added 2 commits September 30, 2025 15:18
This was incorrectly specified and didn't match the implementation.

Signed-off-by: Siwei Zhang <[email protected]>
@bhufmann bhufmann changed the title swagger: Fix specification for sampling in xy output swagger: Fix specification for sampling in xy output (2) Oct 2, 2025
@bhufmann bhufmann force-pushed the newSampling branch 2 times, most recently from 437e9ce to 04f8c61 Compare October 2, 2025 13:38
Copy link
Contributor

@siwei-zhang-work siwei-zhang-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

}
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space.

*
* - Timestamps → flat array → "xValues": [1, 2, 3]
* - Categories → array of strings → "categories": ["Read", "Write"]
* - TimeRanges → array of StartEndRange → ["ranges": { "start": 1, "end": 2 }, { "start": 3, "end": 4 }]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ranges don't necessarily be time ranges, can be duration/frequency ranges.

@bhufmann
Copy link
Contributor Author

not needed anymore since it's handled by #238

@bhufmann bhufmann closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants