• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Method invocation taking time

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am calling DAOImpl method in BO using bo-factory dependancy injection context loader.

I am calculating time of invoking method. I am printing time in console in BO before calling DAOImpl method and then printing time at the start of DAOImpl method.

I am testing it using another thread class which will invoke BO's method which will invoke DAOImpl's method.

I've specified 50 thread in my testing class.

So the method invocation time calculation as follows -
Thread Time
1 - 10 approx 1 Second
11 - 20 approx 2 Seconds
21 - 30 approx 3 Seconds
31 - 40 approx 4 Seconds
41 - 50 approx 5 Seconds

I want that it should not take more than 1 second no matter how may instances are getting called of that DAOImpl.

How can i stop this time consumption taking by DAOImpl method invocation.

Any help would be appreciated.
Thanks in advance.
 
Your mother was a hamster and your father was a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic