imglib / imglib2-cache

Cache interfaces and java.lang.ref based implementation.
Other
6 stars 4 forks source link

Adding a cell loading performance logger #16

Open tischi opened 3 years ago

tischi commented 3 years ago

Hi @tpietzsch @axtimwalde

I am using CellLoader in many projects and I am often in need to benchmark different loading strategies.

In addition, when teaching/helping people it is very handy to be able to visualise what the CellLoader is currently doing and how performant it is.

I thus wrote a little class that helps me logging what the CellLoader is doing:

It currently produces such an output:

Read [0, 0, 711, 0, 0] - [1718, 1619, 711, 0, 0] in 53.07 ms  ( 52.48 MB/s )
Read [0, 0, 710, 0, 0] - [1718, 1619, 710, 0, 0] in 55.42 ms  ( 50.25 MB/s )
Read [0, 0, 706, 0, 0] - [1718, 1619, 706, 0, 0] in 3.25 ms  ( 857.86 MB/s )
Read [0, 0, 704, 0, 0] - [1718, 1619, 704, 0, 0] in 74.96 ms  ( 37.15 MB/s )

Would it be possible to add such a logger (or an improved version of it) to the imglib2-cache repository or somewhere else where one could conveniently import it from?