mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Dasgupta <a10gu...@linux.vnet.ibm.com>
Subject Re: Review Request 49938: Updated GET_METRICS call in MASTER v1 api to return metrics grouped by types.
Date Thu, 14 Jul 2016 10:16:08 GMT

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




src/tests/api_tests.cpp (lines 330 - 341)
<https://reviews.apache.org/r/49938/#comment207777>

    So, total metric size is tested once and it's not tested if Gauges, Counters and Timers
are working fine separately. How about if we modify our GetMetrics test along the following
lines:
    {
      hashmap<string, double> metrics;
    
      foreach (const v1::Metric& metric,
                    v1Response.get().get_metrics().counters()) {
        ASSERT_TRUE(metric.has_value());
        metrics[metric.name()] = metric.value();
      }
    
      // Verifies that the response metrics is not empty.
      ASSERT_LE(0, metrics.size());
    }
    
    Likewise for Gauges and Timers??


- Abhishek Dasgupta


On July 12, 2016, 2:04 a.m., Tuan-Anh Hoang-Vu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49938/
> -----------------------------------------------------------
> 
> (Updated July 12, 2016, 2:04 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-5731
>     https://issues.apache.org/jira/browse/MESOS-5731
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated GET_METRICS call in MASTER v1 api to return metrics grouped by types.
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/master.proto 7fb7153b5498a55469d2c72873c45fb534c0e60d 
>   include/mesos/v1/master/master.proto c9e4359fff018de55d83da5cde0eb6d59dacfc3e 
>   src/master/http.cpp 42ba3643daf8f6fe63152178214b57e3b773d93e 
>   src/tests/api_tests.cpp 55e825ea6a3bd43c76dc67e8b90a97e8c9530a47 
> 
> Diff: https://reviews.apache.org/r/49938/diff/
> 
> 
> Testing
> -------
> 
> Modified MasterAPITest.GetMetrics to make sure we return metrics grouped by types.
> 
> 
> 1. Run master: ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
> 2. Call GET_METRICS: curl --header "Content-Type:application/json" --data '{"type": "GET_METRICS",
"get_metrics":{}}' http://localhost:5050/api/v1 | python -m json.tool
> 
> 
> Thanks,
> 
> Tuan-Anh Hoang-Vu
> 
>


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