added code to measure read from db
This commit is contained in:
@@ -123,6 +123,7 @@ public class CacheServiceImpl implements CacheService {
|
|||||||
@Override
|
@Override
|
||||||
public List<Cache> getAllCaches(CacheSortField sortField, SortDirection direction) {
|
public List<Cache> getAllCaches(CacheSortField sortField, SortDirection direction) {
|
||||||
|
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
List<Cache> caches = new ArrayList<>();
|
List<Cache> caches = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
OObjectDatabaseTx database = dbService.getDatabase();
|
OObjectDatabaseTx database = dbService.getDatabase();
|
||||||
@@ -134,6 +135,8 @@ public class CacheServiceImpl implements CacheService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
System.out.println("Load all caches ("+caches.size()+"): "+(end-start));
|
||||||
|
|
||||||
return caches;
|
return caches;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user