aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reza Motamedi <>
Subject Re: Review Request 54107: changes to intercept and time mybatis invocations
Date Thu, 01 Dec 2016 21:37:54 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 1, 2016, 9:37 p.m.)

Review request for Aurora, David McLaughlin, Joshua Cohen, Mehrdad Nurolahzade, and Santhosh
Kumar Shanmugham.


- added stats name prefix in LoadingCache to reduce the number of objects being created.

Repository: aurora


MyBatis allows us to intercept calls within the execution of a mapped statement. This allows
us to time various mapped statements and ultimately gain more insight on the performance of
the database module.

This patch introduces an interceptor on MyBatis on `updates` and `query` mapped statements.
I used the following convention to create name for the newly collected stats:
mybatis.<<the id of the mapped statement>>

After interception the process is very similar to the one in @Timed-interceptor. SlidingStats
can be used to export interval averages, total milliseconds and the event counts.

__example stats (from ./vars.json)__
mybatis.create_tables_events 1
mybatis.create_tables_events_per_sec 0.0
mybatis.create_tables_nanos_per_event 0.0
mybatis.create_tables_nanos_total 592633784
mybatis.create_tables_nanos_total_per_sec 0.0 3 0.0 0.0 2858362
0.0 333 0.0 0.0 85745680

Diffs (updated)

  src/main/java/org/apache/aurora/scheduler/storage/db/ e7287cec28e7b8ca978c506bfe821f261bc0ac26

  src/main/java/org/apache/aurora/scheduler/storage/db/ PRE-CREATION

  src/test/java/org/apache/aurora/scheduler/storage/db/ PRE-CREATION

  src/test/java/org/apache/aurora/scheduler/storage/mem/ 2e560c0d565689703b282391fe49dbf213ee25dc

  src/test/java/org/apache/aurora/scheduler/storage/mem/ 79999e19454568540c14f91808635bf8dff82bb3



Tests are covered in InstrumentingInterceptorTest.

- testStatIsCreatedOnce
Tests that each stat is created one time only.

- testInterceptMarksMetrics
Tests that invocation is correctly intercepted and then proceeds.


Reza Motamedi

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message