# iView TestBench 1.3

iView TestBench is a memory tracker and tracer for Java applications.
iView TestBench allows to check how much memory and time an iView or any other Java component needs to run. You can see the memory it needs to start up, and the memory needed per step, i.e. user interaction. With the iView TestBech you will be able to find out

- which iView is currently responsible for a certain amount of memory
- which iView produces a huge amount of temporary objects (to service a request)
- which iView methods are performance relevant (take much time)

It is notoriously hard to track memory usage in Java, since memory is shared by all. All components allocate memory, and the garbage collector (GC) collects no longer referenced objects. iView TestBench allows to find out which component allocated and holds a certain amount of memory.

iViews need Memory | Who has the Memory ? | Sherlok can tell !

It is very important to measure iViews because one "bad" iView can slow down the entire application or even crash the JVM with an OutOfMemoryError exception.

## Memory Usage

Even in Java applications its possible to implement memory leaks or inefficient caches. In most of such cases an iView generates an object, adds it to a global reference and just don't remember it anymore. The memory for all other applications will decrease and the GC has to run more often. One component, which grows over time, can eat up all available memory at the end.

Another memory misuse in Java is the allocation of a huge number of temporary objects. The allocation will waste time and the garbage collection will have major impact to the overall performance.

TestBench shows the memory allocation between two garbage collections. The TestBench runs the GC in user defined intervals to show:

- Memory allocation for a defined user interaction
- Memory remaining in usage after GC