Age and RT will be calculated even if an exception occurs during
getData()
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -360,8 +360,8 @@ public class OraMon { | ... | @@ -360,8 +360,8 @@ public class OraMon { |
360 | } | 360 | } |
361 | // We do have the lock. Do the rest in a try catch everything and if we catch anything, re throw the catch but always release the lock. | 361 | // We do have the lock. Do the rest in a try catch everything and if we catch anything, re throw the catch but always release the lock. |
362 | Statement stmt = null; | 362 | Statement stmt = null; |
363 | long startTSns = System.nanoTime(); | ||
363 | try { | 364 | try { |
364 | long startTSns = System.nanoTime(); | ||
365 | getDataCalls++; | 365 | getDataCalls++; |
366 | if(conn == null) open(); | 366 | if(conn == null) open(); |
367 | if(conn.isClosed()) open(); | 367 | if(conn.isClosed()) open(); |
... | @@ -455,6 +455,8 @@ public class OraMon { | ... | @@ -455,6 +455,8 @@ public class OraMon { |
455 | } catch (Exception e2) { | 455 | } catch (Exception e2) { |
456 | // Dont care | 456 | // Dont care |
457 | } | 457 | } |
458 | lastFetchTSns = System.nanoTime(); | ||
459 | lastRTns = lastFetchTSns - startTSns; | ||
458 | throw (e); | 460 | throw (e); |
459 | } finally { | 461 | } finally { |
460 | lock.unlock(); | 462 | lock.unlock(); | ... | ... |
-
Please register or sign in to post a comment