Created
December 11, 2021 16:00
-
-
Save vishalratna-microsoft/357e36a22247cdd5538332ee9d1c894c to your computer and use it in GitHub Desktop.
End the tag based measurement in Activity class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
var prefs = NewsApplication.get(this).getPrefs() | |
prefs = NewsApplication.get(this).getPrefs() | |
val component = NewsApplication.get(this).applicationComponent.plus(NewsFeedModule()) | |
component.inject(this) | |
super.onCreate(savedInstanceState) | |
binding = DataBindingUtil.setContentView(this, R.layout.activity_news_feed) | |
viewModel = ViewModelProvider(this, viewModelFactory).get(NewsFeedActivityViewModelImpl::class.java) | |
registerLiveDataObservers() | |
Snippet.find("app_launch").endCapture(); // End the measurement. | |
// Prints log like this for the above measurement. | |
// 2021-12-11 21:29:07.037 23395-23395/com.takehome.carousell D/NewsApplication: [Class = NewsFeedActivity]|::::|[Method = onCreate]|::::|<Line no. 56>|::::|[Thread name = main]|::::||::::|(176 ms) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment