-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Android build times #206
Comments
Sternbach-Software
changed the title
Adding Android build times
Tracking Android build times
Mar 29, 2022
Duplicate of #116 and fixed in release v14.0.0. |
@alanhamlett Where do you view it on the dashboard? |
We had to rollback the release because it depends on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am having a meeting with my boss about my efficiency, and I want to explain to him that in 300 hours of development, I have probably spent in total 100 hours waiting for Android studio to build, because I don't have a nice computer, and that he should buy my a nice one. I estimated that number assuming I build 15 times every hour and that each build takes 30 seconds, but some hours I don't build at all and some builds take 7 minutes. So, I wish WakaTime would track exactly how long it took me to build the app over time.
I don't know how to build Intellij plugins nor how to set up the environment, so I can't create a PR myself, but I found the relevant files in the Intellij sdk:
GradleBuildState.java and GradleBuildListener.java. In the first file/class (GradleBuildState.java), there is a method named "subscribe" which takes the second file/class (GradleBuildListener.java) as a parameter. The second class is an interface with methods named
buildExecutorCreated()
,buildstarted ()
andbuildFinished()
. I assume the first one is called right when I click the build button, and is responsible for creating the Gradle daemon, and callsbuildStarted()
once the daemon is ready. I want to know how long it took from creating the daemon to finishing, because sometimes creating the daemon takes 20 second for me. All you would have to do is callSystem.nanoTime()
inbuildExecutorCreated()
and inbuildFinished()
and the total time it took it, which is just the second call toSystem.nanoTime()
minus the first call toSystem.nanoTime()
.Please let me know what you think, as I would very possibly be willing to pay for premium if WakaTime had this simple feature to implement. Other than this, keep up the great work! Everything else is amazing!
This may also be helpful (e.g. may be necessary to create the plugin/listen to system build events, or may be helpful for tracking individual build tasks (there are a handful that go into every build and each has their own reason to blame if they are very long)): GradleBuildInvoker.java . Particularly of note are lines 405 through 539.
The text was updated successfully, but these errors were encountered: