This is not really possible. There is https://github.com/jenkinsci/workflow-cps-plugin/blob/f522e783e917bc0aa0513a29684285b710163905/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java#L357-L387 (which is *not* an API you may use from another plugin) but the `run` timing measures only CPS VM thread usage, not aggregate time used by steps invoked *from* that thread, and certainly not memory usage however one might define that (a complex topic).
You might have better success detecting and warning about dumb idioms. Not necessarily with a plugin. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1JOgdn_rz8OsCMVXqTLf2kxOjQ%3DoGxyXvBCat3txSRUQ%40mail.gmail.com.
