aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Sirois <jsir...@apache.org>
Subject Re: Review Request 43150: Expose MyBatis PoolState via stats
Date Wed, 03 Feb 2016 22:08:25 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43150/#review117683
-----------------------------------------------------------


Ship it!




Drive by LGTM.


src/main/java/org/apache/aurora/scheduler/storage/db/DbStorage.java (line 275)
<https://reviews.apache.org/r/43150/#comment178958>

    Consider a bit more DRY - _almost_ like having local functions:
    ```java
    BiConsumer<String, Supplier<? extends Number>> makeGuage = (suffix, guage)
->
        statsProvider.makeGauge("db_storage_mybatis_connection_pool_" + suffix, guage);
    
    makeGuage.accept("requests", poolState::getRequestCount);
    ...
    ```
    
    ... or just extract a second helper function.


- John Sirois


On Feb. 3, 2016, 2:59 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43150/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2016, 2:59 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Bugs: AURORA-1607
>     https://issues.apache.org/jira/browse/AURORA-1607
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> To better understand MyBatis connection pool this patch exposes the pool state via stats.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbStorage.java 7674b8af6d18b39153ecdf02015f0970e035e874

>   src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java 3ab95c615b01f3201e3b87089119abf01d71dbb7

> 
> Diff: https://reviews.apache.org/r/43150/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build -Pq
> Checked the metrics in vagrant
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


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