> Note that if the user requests SARIF output e.g. with > -fdiagnostics-format=sarif-stderr > then any timevar data from -ftime-report is written in JSON form as > part of the SARIF, rather than in text form to stderr (see > 75d623946d4b6ea80a777b789b116d4b4a2298dc). > > I see that the proposed patch leaves the user and sys stats as zero, > and conditionalizes what's printed for text output as part of > timer::print. Should it also do something similar in > make_json_for_timevar_time_def for the json output, and not add the > properties for "user" and "sys" if the data hasn't been gathered?
> Hope I'm reading the patch correctly. Yes that's right. I mainly adjusted the human output for cosmetic reasons. For machine readable i guess it is better to have a stable schema and not skip fields to avoid pain for parsers. So I left it alone. -Andi