Excited to announce DaggerTrack⏰,A Gradle plugin that automatically adds clock tracking to dagger components and their subcomponents.Snapshots available now: https://github.com/amanjeetsingh150/dagger-trackProject Website: https://amanjeetsingh150.github.io/dagger-track/Useful for people optimizing their dagger graphs. Gives you wall clock time, on CPU and off CPU time for your injection.Do try it and give your reviews for further improvements. Contributions, feature requests, and issues are welcome.
Hey @Jeremy thanks for reaching out currently DaggerTrack gives you total time took by dependencies of class say your application class to inject. The time per dependency is something which is in pipeline for this.But you can still see which of your classes took largest time to inject by replicating a cold start through adb commands and then narrow down through debug API tracing to see what is taking maximum time.Hope the answer helps. Let me know if you need any further help on this.
1 year ago
👍 Currently we just add firebase trackers in modules. I've found in multiple apps that init of dagger graph is longest single component of app startup. Maybe library could allow folks to inject arbitrary tracking code for integration w/ their own trackers in prod
For recording the particular time in production as you suggested through trackers I have thought of some ideas like exposing annotations from library which will help you to record any desired dependency and then dump tracking logs to a file or maybe analytics. Will definitely work on this. Let me know if you any other feedbacks while using the library 🙂
1 year ago
yep annotations would work, we currently just use
on the module methods for "expensive" dependencies (okhttp, gson, react native) etc