rustc-perf icon indicating copy to clipboard operation
rustc-perf copied to clipboard

Error message is confusing when piece of query has no data for it or is misspelled

Open rylev opened this issue 4 years ago • 0 comments

I ran into an issue where I was querying for "instructions:u" on local data where the instructions data had not been collected (presumably due to missing support in WSL). The error message returned from the API was confusing and didn't help me quickly realize what was happening.

The current error comes directly from the intern crate. It was "ProcessStatistic does not have instructions:u as a valid value". This happens when we try to parse the string "instructions:u" as a ProcessStatistic and there is not interned string.

intern seems to be a fairly independent crate so changing the error message there seems to not be the right move. Instead we can change the error when parsing ProcessStatistic and the other query pieces (using map_err) to something like: "'instructions:u' is not a valid statistic. Ensure that 'instructions:u' is spelled correctly and data related to it has been stored in the database.".

rylev avatar Jul 11 '21 10:07 rylev