spring-data-orientdb icon indicating copy to clipboard operation
spring-data-orientdb copied to clipboard

Performance tests

Open vidakovic opened this issue 10 years ago • 4 comments

One basic test required is a functional/performance tests with * many thread acquiring/releasing a connection * with the orientdb factory.

vidakovic avatar Dec 18 '14 12:12 vidakovic

@sleroy I suggest we use something like JMH... I think the main project has such tests too.

vidakovic avatar Dec 18 '14 12:12 vidakovic

JMH is a good idea. To give some feedback, in one of my first implementation/ modification on my fork. I integrated the spring-data-orientdb connetor to a spring boot application with spring MVC. I was associating a request with @Transactional. When I test my tool project, I had the surprise to receive errors past the maximum number of allowed connections to the pool.

This problem could have been detected with a JUnit/TestNG test performing something like :

 Executor ex = Executors.newCachedThreadPool(BIG_NUMBER_THREADS);
 for (int i ; i =0  i < BIG_NUMBER_THREADS) {
   ex.submit(new NewTransactionCallable())
 }
 ex.shutdown();

`

sleroy avatar Dec 18 '14 12:12 sleroy

+1

vidakovic avatar Dec 18 '14 13:12 vidakovic

@sleroy module with a simple example is added.

vidakovic avatar Dec 19 '14 02:12 vidakovic