rapid-bird-79300
01/11/2023, 8:04 PMwitty-crayon-22786
01/11/2023, 9:25 PMrapid-bird-79300
01/11/2023, 9:56 PM./pants lint ::
and then ./pants our-workunit-inspector-plugin
witty-crayon-22786
01/11/2023, 9:58 PMSo we would runnot quite… the relevant plugin interface isand then./pants lint ::
./pants our-workunit-inspector-plugin
StreamingWorkunitHandler
: it receives workunits during the run, rather than being a separate goal.rapid-bird-79300
01/11/2023, 10:09 PMwitty-crayon-22786
01/11/2023, 10:15 PMStreamingWorkunits
plugin: the interface is WorkunitsCallback
: https://github.com/pantsbuild/pants/blob/dfbfd75f3b1ce1d4c53a639eaeda2254d75078d8/[…]stprojects/pants-plugins/src/python/workunit_logger/register.pyDoes Toolchain already offer that break down by lint tool workunit?yes, on a build-by-build basis. we don’t aggregate across tasks currently, but it’s something we’ve discussed doing
rapid-bird-79300
01/11/2023, 10:20 PMbroad-processor-92400
01/12/2023, 2:24 AM./pants --stats-log --no-local-cache --no-pantsd lint --only=isort ::
(and similarly with --only=flake8
), and then looking at the local_process_total_time_run_ms: ...
.
I think this will include the time to set-up the tools, but if you're just doing this to work out why linting is taking a very long time (or similar), I suspect that it'll be enough to narrow down the problem