Track execution time per task in gradle script?

后端 未结 8 2130
深忆病人
深忆病人 2021-01-30 06:37

What is the most elegant way to track the execution times on how long a task took in a gradle build script? In an optimal case log the time directly same or next line to the tas

8条回答
  •  温柔的废话
    2021-01-30 07:22

    I created a plugin since passy/build-time-tracker-plugin is no longer actively maintained. Mine prints ASCII bar charts too, and comes with customization options.

    https://github.com/asarkar/build-time-tracker

    == Build time summary ==
     :commons:extractIncludeProto | 4.000s | 14% | ████
           :commons:compileKotlin | 2.000s |  7% | ██
             :commons:compileJava | 6.000s | 21% | ██████
    :service-client:compileKotlin | 1.000s |  4% | █
            :webapp:compileKotlin | 1.000s |  4% | █
         :webapp:dockerBuildImage | 4.000s | 14% | ████
          :webapp:dockerPushImage | 4.000s | 14% | ████
    

提交回复
热议问题