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

Natural sorting of sources and metrics #386

Open
clarfonthey opened this issue Sep 1, 2019 · 2 comments
Open

Natural sorting of sources and metrics #386

clarfonthey opened this issue Sep 1, 2019 · 2 comments
Labels
Back-end Back-end component related (API) Enhancement

Comments

@clarfonthey
Copy link
Contributor

Right now, the source cpu-10 comes before cpu-2. In general, whenever there's a number in the middle of a source or metric, it should be sorted numerically rather than lexicographically.

There are all sorts of names for this kind of scheme, and "version" sorting is sometimes used instead of "natural" sorting. But either way, this would be nice to have!

@vbatoufflet
Copy link
Member

Hi @clarfon,

Old version of Facette once had this feature. I didn't manage to reimplement it now we switch to a SQL-based storage with pagination support.

I'll look at what are the possibilities and what could be done for this.

@vbatoufflet vbatoufflet added Back-end Back-end component related (API) Enhancement labels Nov 13, 2019
@clarfonthey
Copy link
Contributor Author

Presumably, it could be done with a fancy ORDER BY expression, or alternatively, a column with a pre-normalised value that can be sorted lexicographically. I'd offer to help code a solution but don't want to offer something that might be incompatible with the next-version changes you have in store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end Back-end component related (API) Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants