Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread taking maximum time  RSS feed

 
Ranch Hand
Posts: 220
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose we have an application which spawns 50 threads. I want to figure out which thread is taking maximum amount of time. How can we extract this information?
 
Saloon Keeper
Posts: 8754
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At runtime, or do you want to perform a test?
 
Vaibhav Gargs
Ranch Hand
Posts: 220
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At runtime in production. Can we do some kind of logging
 
Stephan van Hulst
Saloon Keeper
Posts: 8754
162
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to instrument your code with ThreadMXBean.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!