microsoft / Microsoft-Performance-Tools-Linux-Android

Linux, Android and Chromium Performance Tools built using the Microsoft Performance Toolkit. Cross-platform .NET Core + WPA GUI
MIT License
322 stars 35 forks source link

Linux "perf" traces give a confusing error if the trace is not named "perf.data.txt" #74

Closed dmachaj closed 2 years ago

dmachaj commented 2 years ago

I was trying to have multiple trace files in the same directory. I was really confused because only my original trace (named perf.data.txt) would open correctly. Eventually it was realized that the file name matters. Renaming the other trace to something else and my new trace to perf.data.txt allowed me to open it in WPA. This error message is counfusing/misleading to me because it doesn't provide any guidance or hint about what is wrong.

image (Apologies for a screenshot of a screenshot)

ivberg commented 2 years ago

This is good feedback and valid. Unfortunately, this is similar to matching file extensions in the OS file browser with apps that handle certain extensions. If an app says it doesn't handle X file or extension, then it might be nice to see what files are supported, rather than the OS just giving up.

However, the SDK only has this func which each plugin implements custom logic (IsDataSourceSupportedCore(IDataSource dataSource) {} ) so it doesn't expose this now - only that is can or can't accept a given file