Skip to content
Snippets Groups Projects
Commit 42043f23 authored by Christopher R. Johnson's avatar Christopher R. Johnson Committed by CQ bot account: commit-bot@chromium.org
Browse files

[libinspect] Sort numeric values numerically.

All metric/property/children keys are strings in inspect, but sometimes
lexicographic sorting is not desired. For example, values with numeric
keys make the most sense to sort numerically.

This change changes the logic to the following:
- If all children of a node have keys consisting of digits, sort
numerically.
- Otherwise, sort lexicographically.
- Perform the above for metrics and properties as well.

This behavior makes a sensible default based on current use cases.
Future use cases may implement their own sorting if needed.

CF-684: #done
Change-Id: I378dfa7ce60e51252139e14bb3c9ccc14ef7eb72
parent 2419002c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment