Re: Review Request 44379: Use tokens size to parse perf stat format.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/ --- (Updated 四月 18, 2016, 5:41 a.m.) Review request for mesos and Ben Mahler. Changes --- Elaborate more about the commets Bugs: MESOS-4705 https://issues.apache.org/jira/browse/MESOS-4705 Repository: mesos Description (updated) --- Co-authored with haosdent. Diffs (updated) - src/linux/perf.cpp 749e676aaf2ce639dd976f2b23e323300c6114c5 Diff: https://reviews.apache.org/r/44379/diff/ Testing --- 1. {Found and Test} with Serenity, ema filter could get perf event statistics correctly as expected. 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* --log_dir=/tmp/mesos/ Thanks, fan du
Re: Review Request 44379: Use tokens size to parse perf stat format.
> On 四月 11, 2016, 2:09 p.m., Klaus Ma wrote: > > Ship It! > > Klaus Ma wrote: > LGTM. Just wonder how to handle the input that did not follow our > expectation: > > // value,event,cgroup > // value,unit,event,cgroup > // value,unit,event,cgroup,running,ratio Any format other than above is invalid :) - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/#review128117 --- On 四月 11, 2016, 7:01 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44379/ > --- > > (Updated 四月 11, 2016, 7:01 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-4705 > https://issues.apache.org/jira/browse/MESOS-4705 > > > Repository: mesos > > > Description > --- > > Use tokens size to parse perf stat format. > > Co-authored with haosdent. > > > Diffs > - > > src/linux/perf.cpp 749e676aaf2ce639dd976f2b23e323300c6114c5 > > Diff: https://reviews.apache.org/r/44379/diff/ > > > Testing > --- > > 1. {Found and Test} with Serenity, ema filter could get perf event statistics > correctly as expected. > 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* > --log_dir=/tmp/mesos/ > > > Thanks, > > fan du > >
Re: Review Request 44379: Use tokens size to parse perf stat format.
> On April 11, 2016, 7:08 a.m., haosdent huang wrote: > > Thanks you very much for your quick reply! By the way, this patch should > > credited by you, please update the description and remove my name. Quite > > appreciated your great help again so that I could rebase my patches depend > > on this. You have also spend time to debug it, never mind, it's just a patch. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/#review128076 --- On April 11, 2016, 7:01 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44379/ > --- > > (Updated April 11, 2016, 7:01 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-4705 > https://issues.apache.org/jira/browse/MESOS-4705 > > > Repository: mesos > > > Description > --- > > Use tokens size to parse perf stat format. > > Co-authored with haosdent. > > > Diffs > - > > src/linux/perf.cpp 749e676aaf2ce639dd976f2b23e323300c6114c5 > > Diff: https://reviews.apache.org/r/44379/diff/ > > > Testing > --- > > 1. {Found and Test} with Serenity, ema filter could get perf event statistics > correctly as expected. > 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* > --log_dir=/tmp/mesos/ > > > Thanks, > > fan du > >
Re: Review Request 44379: Use tokens size to parse perf stat format.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/ --- (Updated 四月 11, 2016, 7:01 a.m.) Review request for mesos and Ben Mahler. Changes --- Add haosdent with co-author. Bugs: MESOS-4705 https://issues.apache.org/jira/browse/MESOS-4705 Repository: mesos Description (updated) --- Use tokens size to parse perf stat format. Co-authored with haosdent. Diffs - src/linux/perf.cpp 749e676aaf2ce639dd976f2b23e323300c6114c5 Diff: https://reviews.apache.org/r/44379/diff/ Testing --- 1. {Found and Test} with Serenity, ema filter could get perf event statistics correctly as expected. 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* --log_dir=/tmp/mesos/ Thanks, fan du
Re: Review Request 44379: Use tokens size to parse perf stat format.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/ --- (Updated 四月 11, 2016, 6:57 a.m.) Review request for mesos and Ben Mahler. Changes --- Use tokens size to parse perf stat format. Summary (updated) - Use tokens size to parse perf stat format. Bugs: MESOS-4705 https://issues.apache.org/jira/browse/MESOS-4705 Repository: mesos Description (updated) --- Use tokens size to parse perf stat format. Diffs (updated) - src/linux/perf.cpp 749e676aaf2ce639dd976f2b23e323300c6114c5 Diff: https://reviews.apache.org/r/44379/diff/ Testing --- 1. {Found and Test} with Serenity, ema filter could get perf event statistics correctly as expected. 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* --log_dir=/tmp/mesos/ Thanks, fan du
Re: Review Request 45808: Update metrics for SUBSCRIBE call for both PID/HTTP frameworks.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45808/ --- (Updated 四月 7, 2016, 2:25 a.m.) Review request for mesos, Ben Mahler and Vinod Kone. Changes --- Fixup coding style by dressing braces for if and else blocks Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- This change will cover three cases: 1. Directly call {re}registerFramework 2. Through HTTP call 3. Through MesosSchedulerDriver Suggested by Benjamin Mahler to introspect framework_info.id. Diffs (updated) - src/master/master.cpp 2cfa5075991bbb5df8a7e33b14767de558bda4ac Diff: https://reviews.apache.org/r/45808/diff/ Testing --- 1. I can use 'docker-no-executor-framework' to reproduce/verify the issue. "master/messages_register_framework": 1.0, "master/messages_reregister_framework": 0.0, Thanks, fan du
Re: Review Request 45808: Update metrics for SUBSCRIBE call for both PID/HTTP frameworks.
> On 四月 6, 2016, 6:15 p.m., Vinod Kone wrote: > > src/master/master.cpp, lines 2089-2092 > > <https://reviews.apache.org/r/45808/diff/1/?file=1327488#file1327488line2089> > > > > we always use braces around our if and else blocks. > > > > if () { > > > > } else { > > > > } Good to know the rule here. Thanks! - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45808/#review127391 ----------- On 四月 6, 2016, 8:59 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45808/ > --- > > (Updated 四月 6, 2016, 8:59 a.m.) > > > Review request for mesos, Ben Mahler and Vinod Kone. > > > Bugs: MESOS-4981 > https://issues.apache.org/jira/browse/MESOS-4981 > > > Repository: mesos > > > Description > --- > > This change will cover three cases: > 1. Directly call {re}registerFramework > 2. Through HTTP call > 3. Through MesosSchedulerDriver > > Suggested by Benjamin Mahler to introspect framework_info.id. > > > Diffs > - > > src/master/master.cpp 2cfa5075991bbb5df8a7e33b14767de558bda4ac > > Diff: https://reviews.apache.org/r/45808/diff/ > > > Testing > --- > > 1. I can use 'docker-no-executor-framework' to reproduce/verify the issue. > > "master/messages_register_framework": 1.0, > "master/messages_reregister_framework": 0.0, > > > Thanks, > > fan du > >
Review Request 45808: Update metrics for SUBSCRIBE call for both PID/HTTP frameworks.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45808/ --- Review request for mesos, Ben Mahler and Vinod Kone. Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- This change will cover three cases: 1. Directly call {re}registerFramework 2. Through HTTP call 3. Through MesosSchedulerDriver Suggested by Benjamin Mahler to introspect framework_info.id. Diffs - src/master/master.cpp 2cfa5075991bbb5df8a7e33b14767de558bda4ac Diff: https://reviews.apache.org/r/45808/diff/ Testing --- 1. I can use 'docker-no-executor-framework' to reproduce/verify the issue. "master/messages_register_framework": 1.0, "master/messages_reregister_framework": 0.0, Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- (Updated 三月 24, 2016, 1:54 a.m.) Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Changes --- Fix coding sytle by adding blank line. Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. Diffs (updated) - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/http.cpp 950206baf7f3a1cccdc49d810126473966d8d021 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing --- ChangLog: v3: - Move the couting out of common code path to http endpoint and master accept call separately to reflect its logic. v2: - Documenting those metrics - Add test code for MetricsTest as suggested by Guangya - post-review.py does not update original RR(https://reviews.apache.org/r/44058/), but only create a new one even if I rebased. Tests: 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 45097: Update metrics for SUBSCRIBE call for both PID/HTTP frameworks.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45097/ --- (Updated 三月 22, 2016, 6:42 a.m.) Review request for mesos, Anand Mazumdar and Vinod Kone. Changes --- Fix coredump reported by test roboot Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- This change will cover three cases: 1. Directly call {re}registerFramework 2. Through HTTP call 3. Through MesosSchedulerDriver And don't overlap 'master/messages_register_framework' with 'master/messages_reregister_framework'. Diffs (updated) - src/master/master.cpp e6290ea686ccf17813d6faeaf2f2012f79cf3b7f Diff: https://reviews.apache.org/r/45097/diff/ Testing (updated) --- 1. I can use 'docker-no-executor-framework' to reproduce/verify the issue. "master/messages_register_framework": 1.0, "master/messages_reregister_framework": 0.0, 2. Fix make check error by implementing 'minus' operation correctly for Counter. make check GTEST_FILTER="AuthenticationTest*" [--] 21 tests from AuthenticationTest (7019 ms total) [--] Global test environment tear-down [==] 21 tests from 1 test case ran. (7140 ms total) [ PASSED ] 21 tests. Thanks, fan du
Re: Review Request 45096: Introduce 'minus' operator for class Counter.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45096/ --- (Updated 三月 22, 2016, 6:42 a.m.) Review request for mesos, Anand Mazumdar and Vinod Kone. Changes --- Implement 'minus' operation for Counter correctly. Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- Introduce 'minus' operator for class Counter. Diffs (updated) - 3rdparty/libprocess/include/process/metrics/counter.hpp a13cc7e18c8b23eae83c326d63874d9d2aaedc0d Diff: https://reviews.apache.org/r/45096/diff/ Testing --- Thanks, fan du
Review Request 45097: Update metrics for SUBSCRIBE call for both PID/HTTP frameworks.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45097/ --- Review request for mesos and Anand Mazumdar. Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- This change will cover three cases: 1. Directly call {re}registerFramework 2. Through HTTP call 3. Through MesosSchedulerDriver And don't overlap 'master/messages_register_framework' with 'master/messages_reregister_framework'. Diffs - src/master/master.cpp e6290ea686ccf17813d6faeaf2f2012f79cf3b7f Diff: https://reviews.apache.org/r/45097/diff/ Testing --- I can use 'docker-no-executor-framework' to reproduce/verify the issue. "master/messages_register_framework": 1.0, "master/messages_reregister_framework": 0.0, Thanks, fan du
Review Request 45095: Introduce 'minus' operator for class Counter.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45095/ --- Review request for mesos and Anand Mazumdar. Bugs: MESOS-4981 https://issues.apache.org/jira/browse/MESOS-4981 Repository: mesos Description --- Introduce 'minus' operator for class Counter. Diffs - 3rdparty/libprocess/include/process/metrics/counter.hpp a13cc7e18c8b23eae83c326d63874d9d2aaedc0d Diff: https://reviews.apache.org/r/45095/diff/ Testing --- Thanks, fan du
Re: Review Request 44379: Correctly parse perf stat format for non-vanilla 3.10 kernel.
> On 三月 17, 2016, 1:02 a.m., Ben Mahler wrote: > > src/linux/perf.cpp, lines 435-437 > > <https://reviews.apache.org/r/44379/diff/2/?file=1293838#file1293838line435> > > > > Hm.. this comment is really hard for me to understand, if OS vendors > > enhance the format, how did you know that they only use this particular > > format and not others? Thanks for the review! The format itself doesn't matter, the order of the format does, that's why we use size of tokens to parse the format. Moreover, this format is full fledged which should be supported by all means. btw, it's unlikely for my custom to depoly upstream kernel in production, that's why I stay on Centos7 stable kernel in most cases. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/#review123962 ------- On 三月 10, 2016, 3:26 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44379/ > --- > > (Updated 三月 10, 2016, 3:26 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-4705 > https://issues.apache.org/jira/browse/MESOS-4705 > > > Repository: mesos > > > Description > --- > > For vanilla kernel <= 3.12, 'perf stat' format is: > value,event,cgroup > Tested with 3.12, 3.11, 3.10 vanilla kernel. > > OS vendors may enhance perf tools with additional format: > value,unit,event,cgroup,running,ratio > Tested on Centos 7 with kernel 3.10.0-{123 OR 229}.el7.x86_64 > > > Diffs > - > > src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 > > Diff: https://reviews.apache.org/r/44379/diff/ > > > Testing > --- > > 1. {Found and Test} with Serenity, ema filter could get perf event statistics > correctly as expected. > 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* > --log_dir=/tmp/mesos/ > > > Thanks, > > fan du > >
Re: Review Request 44881: Generize perf event parsing to match PerfStatistics filed name for "perf stat"
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44881/ --- (Updated 三月 16, 2016, 2:07 a.m.) Review request for mesos. Changes --- Make the summary more informative Summary (updated) - Generize perf event parsing to match PerfStatistics filed name for "perf stat" Bugs: MESOS-4955 https://issues.apache.org/jira/browse/MESOS-4955 Repository: mesos Description --- Current design does not support event like: SUBSYS/EVENT <- Most notable intel_cqm/llc_occupancy/ SUSSYS:EVENT <- All Tracepoint event The current logic could be easily expended a bit to support above to scenario. Diffs - include/mesos/mesos.proto 3d22ec32655dca741169e1f0e382303e061c38b7 include/mesos/v1/mesos.proto 31960a52061f70d80528fb8326522ae1d6f75b2c src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 Diff: https://reviews.apache.org/r/44881/diff/ Testing --- Before this modification, slave spew: E0316 09:37:15.352880 116764 perf_event.cpp:408] Failed to get perf sample: Failed to parse perf sample: Unexpected event 'intel_cqm/llc_occupancy/' in perf output at line: 0.00,Bytes,intel_cqm/llc_occupancy/,mesos/fad99e5c-5ef2-4908-83de-3b5d7c2bb71f,9795836,100.00 After this modificaiton, I could intel_cqm/llc_occupancy statistics. Thanks, fan du
Review Request 44881: Provide generic perf event parsing.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44881/ --- Review request for mesos. Bugs: MESOS-4955 https://issues.apache.org/jira/browse/MESOS-4955 Repository: mesos Description --- Current design does not support event like: SUBSYS/EVENT <- Most notable intel_cqm/llc_occupancy/ SUSSYS:EVENT <- All Tracepoint event The current logic could be easily expended a bit to support above to scenario. Diffs - include/mesos/mesos.proto 3d22ec32655dca741169e1f0e382303e061c38b7 include/mesos/v1/mesos.proto 31960a52061f70d80528fb8326522ae1d6f75b2c src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 Diff: https://reviews.apache.org/r/44881/diff/ Testing --- Before this modification, slave spew: E0316 09:37:15.352880 116764 perf_event.cpp:408] Failed to get perf sample: Failed to parse perf sample: Unexpected event 'intel_cqm/llc_occupancy/' in perf output at line: 0.00,Bytes,intel_cqm/llc_occupancy/,mesos/fad99e5c-5ef2-4908-83de-3b5d7c2bb71f,9795836,100.00 After this modificaiton, I could intel_cqm/llc_occupancy statistics. Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- (Updated 三月 14, 2016, 5:50 a.m.) Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Changes --- Makethe metrics counting for both NG cases(sanity check and validation check) and OK cases Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. Diffs (updated) - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/http.cpp 950206baf7f3a1cccdc49d810126473966d8d021 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing --- ChangLog: v3: - Move the couting out of common code path to http endpoint and master accept call separately to reflect its logic. v2: - Documenting those metrics - Add test code for MetricsTest as suggested by Guangya - post-review.py does not update original RR(https://reviews.apache.org/r/44058/), but only create a new one even if I rebased. Tests: 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
> On 三月 12, 2016, 2:11 a.m., Greg Mann wrote: > > src/master/http.cpp, line 787 > > <https://reviews.apache.org/r/44255/diff/3/?file=1293828#file1293828line787> > > > > This increment statement occurs after some invalidation logic, and > > directly before the authorization call; is this precisely where we want to > > be incrementing? We end up not counting invalid operations, but counting > > unauthorized operations. > > > > Looking through the other metrics code in master.cpp, it seems we > > aren't entirely consistent with respect to when we increment the > > `messages_XXX` metrics. We increment them both before and after operation > > validation, for example. > > > > In master.cpp, there are some existing `messages_XXX` metrics in the > > `accept()` function which get incremented together; those occur before > > validation and before authorization. To be consistent, you should probably > > do the same here. Currently, the metric gets incremented after `validate()` > > is called. > > > > We should create a separate JIRA for making all of the messages metrics > > consistent with respect to when they get incremented. I think the rule is clear to do the counting at the function entry call to include all other NG cases(sanity check and validation) as well. Thanks for the point, and pls review the updated RR. I will create another JIRA to track other metrics issue, and discuss with you later. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/#review123247 --- On 三月 10, 2016, 2:42 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44255/ > --- > > (Updated 三月 10, 2016, 2:42 a.m.) > > > Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. > > > Bugs: MESOS-4492 > https://issues.apache.org/jira/browse/MESOS-4492 > > > Repository: mesos > > > Description > --- > > Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. > > > Diffs > - > > docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 > src/master/http.cpp 950206baf7f3a1cccdc49d810126473966d8d021 > src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 > src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 > src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 > src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd > > Diff: https://reviews.apache.org/r/44255/diff/ > > > Testing > --- > > ChangLog: > > v3: > - Move the couting out of common code path to http endpoint and master > accept call separately to reflect its logic. > > v2: > - Documenting those metrics > - Add test code for MetricsTest as suggested by Guangya > - post-review.py does not update original > RR(https://reviews.apache.org/r/44058/), but only create a new one even if I > rebased. > > > Tests: > 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 > (3.10.0-123.el7.x86_640) > > [==] Running 1 test from 1 test case. > [--] Global test environment set-up. > [--] 1 test from MetricsTest > [ RUN ] MetricsTest.Master > [ OK ] MetricsTest.Master (211 ms) > [--] 1 test from MetricsTest (211 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (244 ms total) > [ PASSED ] 1 test > > 2. Verify its functionality with 'reserve' http endpoint as an test case > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 0.0, > "master/messages_unreserve_resource": 0.0, > > > # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ > { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 > },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST > ipdc02-kvm-guest2:5050/master/reserve > HTTP/1.1 200 OK > Date: Fri, 26 Feb 2016 19:59:01 GMT > Content-Length: 0 > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 1.0, > "master/messages_unreserve_resource": 0.0, > > > Thanks, > > fan du > >
Re: Review Request 44379: Correctly parse perf stat format for non-vanilla 3.10 kernel.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/ --- (Updated 三月 10, 2016, 3:24 a.m.) Review request for mesos. Changes --- Rephrase the commit log and comments to make it clear Summary (updated) - Correctly parse perf stat format for non-vanilla 3.10 kernel. Bugs: MESOS-4705 https://issues.apache.org/jira/browse/MESOS-4705 Repository: mesos Description (updated) --- For vanilla kernel <= 3.12, 'perf stat' format is: value,event,cgroup Tested with 3.12, 3.11, 3.10 vanilla kernel. OS vendors may enhance perf tools with additional format: value,unit,event,cgroup,running,ratio Tested on Centos 7 with kernel 3.10.0-{123 OR 229}.el7.x86_64 Diffs (updated) - src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 Diff: https://reviews.apache.org/r/44379/diff/ Testing (updated) --- 1. {Found and Test} with Serenity, ema filter could get perf event statistics correctly as expected. 2. ./bin/mesos-tests.sh --gtest_filter=PerfEventIsolatorTest* --log_dir=/tmp/mesos/ Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
> On 三月 7, 2016, 10:43 p.m., Jie Yu wrote: > > src/master/master.cpp, line 2846 > > <https://reviews.apache.org/r/44255/diff/2/?file=1278717#file1278717line2846> > > > > I looked weird to me that we increase the metrics for reserve resources > > in 'authorizeXXX' function. Can you do that in the callers of authorizeXXX > > function instead? > > fan du wrote: > Thanks for the reviewing :) > It intended to reduce code duplication, do the statistics counting here > in the common path from both http endpoint and normal framework RECEIVE > message. If you insist, I'm willing to do it seprately. > > Greg Mann wrote: > I think Jie's reasoning is that semantically, it is strange for the > `authorizeXXX` function to have the side-effect of incrementing the metrics. > I missed this in my reviews, but on further consideration this seems like a > case where duplicating code is worth it in order to maintain the proper > separation of concerns in the `authorizeXXX` functions. No problem! I've updated the patch as you and Jieyu suggested :) - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/#review122396 ------- On 三月 10, 2016, 2:42 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44255/ > --- > > (Updated 三月 10, 2016, 2:42 a.m.) > > > Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. > > > Bugs: MESOS-4492 > https://issues.apache.org/jira/browse/MESOS-4492 > > > Repository: mesos > > > Description > --- > > Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. > > > Diffs > - > > docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 > src/master/http.cpp 950206baf7f3a1cccdc49d810126473966d8d021 > src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 > src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 > src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 > src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd > > Diff: https://reviews.apache.org/r/44255/diff/ > > > Testing > --- > > ChangLog: > > v3: > - Move the couting out of common code path to http endpoint and master > accept call separately to reflect its logic. > > v2: > - Documenting those metrics > - Add test code for MetricsTest as suggested by Guangya > - post-review.py does not update original > RR(https://reviews.apache.org/r/44058/), but only create a new one even if I > rebased. > > > Tests: > 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 > (3.10.0-123.el7.x86_640) > > [==] Running 1 test from 1 test case. > [--] Global test environment set-up. > [--] 1 test from MetricsTest > [ RUN ] MetricsTest.Master > [ OK ] MetricsTest.Master (211 ms) > [--] 1 test from MetricsTest (211 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (244 ms total) > [ PASSED ] 1 test > > 2. Verify its functionality with 'reserve' http endpoint as an test case > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 0.0, > "master/messages_unreserve_resource": 0.0, > > > # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ > { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 > },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST > ipdc02-kvm-guest2:5050/master/reserve > HTTP/1.1 200 OK > Date: Fri, 26 Feb 2016 19:59:01 GMT > Content-Length: 0 > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 1.0, > "master/messages_unreserve_resource": 0.0, > > > Thanks, > > fan du > >
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- (Updated 三月 10, 2016, 2:42 a.m.) Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Changes --- Move the couting out of common code path to http endpoint and master accept call separately to reflect its logic. Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. Diffs (updated) - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/http.cpp 950206baf7f3a1cccdc49d810126473966d8d021 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing (updated) --- ChangLog: v3: - Move the couting out of common code path to http endpoint and master accept call separately to reflect its logic. v2: - Documenting those metrics - Add test code for MetricsTest as suggested by Guangya - post-review.py does not update original RR(https://reviews.apache.org/r/44058/), but only create a new one even if I rebased. Tests: 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 44379: Correctly parse perf stat format for 3.10 kernel.
> On 三月 8, 2016, 1:35 a.m., Ben Mahler wrote: > > src/linux/perf.cpp, lines 430-431 > > <https://reviews.apache.org/r/44379/diff/1/?file=1280476#file1280476line430> > > > > Couple of thoughts here: > > > > (1) This comment is no longer accurate since there is a special case > > for 3.10. Would be better to re-structure the last block of this else flow > > to better reflect the new logic. > > > > (2) What about 3.11? Is it the same as 3.10? It would be surprising if > > 3.11 and < 3.10 are the same, but 3.10 is different. > > haosdent huang wrote: > There is a exist patch may related to this. > https://reviews.apache.org/r/43283/ To Ben Mahler: Thanks for the the comments, you got it, I gave vanilla 3.10 kernel a try, it turns out as you expected: ,cycles,mesos/0ca020e9-2db3-4a47-87f0-b4c831409ef7 I use Centos 7 with kernel 3.10.0-123.el7.x86_64, might with perf enhancement. I will rework the comments anyway if you don't have any other comments. To Haosdent: I also use Centos 7, and tried 3.10.0-{123 OR 229}.el7.x86_64, perf stat has below format: value,unit,event,cgroup,running,ratio May I know which kernel version do you use? thanks - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/#review122455 ------- On 三月 4, 2016, 6:28 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44379/ > --- > > (Updated 三月 4, 2016, 6:28 a.m.) > > > Review request for mesos. > > > Bugs: MESOS-4705 > https://issues.apache.org/jira/browse/MESOS-4705 > > > Repository: mesos > > > Description > --- > > Correctly parse perf stat format for 3.10 kernel. > > > Diffs > - > > src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 > > Diff: https://reviews.apache.org/r/44379/diff/ > > > Testing > --- > > {Found and Test} with Serenity, ema filter could get perf event statistics > correctly as expected. > > > Thanks, > > fan du > >
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
> On March 7, 2016, 10:43 p.m., Jie Yu wrote: > > src/master/master.cpp, line 2846 > > <https://reviews.apache.org/r/44255/diff/2/?file=1278717#file1278717line2846> > > > > I looked weird to me that we increase the metrics for reserve resources > > in 'authorizeXXX' function. Can you do that in the callers of authorizeXXX > > function instead? Thanks for the reviewing :) It intended to reduce code duplication, do the statistics counting here in the common path from both http endpoint and normal framework RECEIVE message. If you insist, I'm willing to do it seprately. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/#review122396 ----------- On March 3, 2016, 5:40 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44255/ > --- > > (Updated March 3, 2016, 5:40 a.m.) > > > Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. > > > Bugs: MESOS-4492 > https://issues.apache.org/jira/browse/MESOS-4492 > > > Repository: mesos > > > Description > --- > > Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. > > > Diffs > - > > docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 > src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 > src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 > src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 > src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd > > Diff: https://reviews.apache.org/r/44255/diff/ > > > Testing > --- > > ChangLog: > v2: > - Documenting those metrics > - Add test code for MetricsTest as suggested by Guangya > - post-review.py does not update original > RR(https://reviews.apache.org/r/44058/), but only create a new one even if I > rebased. > > > Tests: > 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 > (3.10.0-123.el7.x86_640) > > [==] Running 1 test from 1 test case. > [--] Global test environment set-up. > [--] 1 test from MetricsTest > [ RUN ] MetricsTest.Master > [ OK ] MetricsTest.Master (211 ms) > [--] 1 test from MetricsTest (211 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (244 ms total) > [ PASSED ] 1 test > > 2. Verify its functionality with 'reserve' http endpoint as an test case > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 0.0, > "master/messages_unreserve_resource": 0.0, > > > # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ > { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 > },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST > ipdc02-kvm-guest2:5050/master/reserve > HTTP/1.1 200 OK > Date: Fri, 26 Feb 2016 19:59:01 GMT > Content-Length: 0 > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 1.0, > "master/messages_unreserve_resource": 0.0, > > > Thanks, > > fan du > >
Review Request 44379: Correctly parse perf stat format for 3.10 kernel.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44379/ --- Review request for mesos. Bugs: MESOS-4705 https://issues.apache.org/jira/browse/MESOS-4705 Repository: mesos Description --- Correctly parse perf stat format for 3.10 kernel. Diffs - src/linux/perf.cpp 1c113a2b3f57877e132bbd65e01fb2f045132128 Diff: https://reviews.apache.org/r/44379/diff/ Testing --- {Found and Test} with Serenity, ema filter could get perf event statistics correctly as expected. Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
> On 三月 2, 2016, 7:40 p.m., Greg Mann wrote: > > Thanks Fan! I'm having a look at this now. Regarding the problems with > > review board not wanting to update your previous RR, it's probably because > > it didn't find the review URL in the commit message. In order to determine > > which RR it should update, the script looks for a string like "Review: > > https://reviews.apache.org/r/44255/; in the commit message of the commit > > you're pushing to review board. If you make sure that string (with the > > correct URL) is in your commit message locally, review board should be able > > to find your previous review and update it. yes, it seems I recreated the commit message when rebasing without adding "Review: https://reviews.apache.org/r/44255;. squash the commits together should also works ok :) Thanks for your kindness. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/#review121705 ----------- On 三月 3, 2016, 5:40 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44255/ > --- > > (Updated 三月 3, 2016, 5:40 a.m.) > > > Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. > > > Bugs: MESOS-4492 > https://issues.apache.org/jira/browse/MESOS-4492 > > > Repository: mesos > > > Description > --- > > Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. > > > Diffs > - > > docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 > src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 > src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 > src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 > src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd > > Diff: https://reviews.apache.org/r/44255/diff/ > > > Testing > --- > > ChangLog: > v2: > - Documenting those metrics > - Add test code for MetricsTest as suggested by Guangya > - post-review.py does not update original > RR(https://reviews.apache.org/r/44058/), but only create a new one even if I > rebased. > > > Tests: > 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 > (3.10.0-123.el7.x86_640) > > [==] Running 1 test from 1 test case. > [--] Global test environment set-up. > [--] 1 test from MetricsTest > [ RUN ] MetricsTest.Master > [ OK ] MetricsTest.Master (211 ms) > [--] 1 test from MetricsTest (211 ms total) > > [--] Global test environment tear-down > [==] 1 test from 1 test case ran. (244 ms total) > [ PASSED ] 1 test > > 2. Verify its functionality with 'reserve' http endpoint as an test case > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 0.0, > "master/messages_unreserve_resource": 0.0, > > > # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ > { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 > },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST > ipdc02-kvm-guest2:5050/master/reserve > HTTP/1.1 200 OK > Date: Fri, 26 Feb 2016 19:59:01 GMT > Content-Length: 0 > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 1.0, > "master/messages_unreserve_resource": 0.0, > > > Thanks, > > fan du > >
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- (Updated 三月 3, 2016, 5:40 a.m.) Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Changes --- Incorperated comments from Greg Mann 1. Fix few typos 2. Drop signed-off-by Summary (updated) - Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description (updated) --- Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation. Diffs (updated) - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing --- ChangLog: v2: - Documenting those metrics - Add test code for MetricsTest as suggested by Guangya - post-review.py does not update original RR(https://reviews.apache.org/r/44058/), but only create a new one even if I rebased. Tests: 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- (Updated 三月 2, 2016, 5:18 a.m.) Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Changes --- add tiny changelog Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Signed-off-by: Fan Du <fan...@intel.com> Diffs - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing (updated) --- ChangLog: v2: - Documenting those metrics - Add test code for MetricsTest as suggested by Guangya - post-review.py does not update original RR(https://reviews.apache.org/r/44058/), but only create a new one even if I rebased. Tests: 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Review Request 44255: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44255/ --- Review request for mesos, Greg Mann, Guangya Liu, haosdent huang, and Jie Yu. Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Signed-off-by: Fan Du <fan...@intel.com> Diffs (updated) - docs/monitoring.md 323d01d99456a71bd384faf186264e3fc4bf2207 src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 src/tests/metrics_tests.cpp 419d275e0b32817388120222bd433ee6f4835efd Diff: https://reviews.apache.org/r/44255/diff/ Testing (updated) --- 1. make check GTEST_FILTER="MetricsTest.Master" on Centos-7 (3.10.0-123.el7.x86_640) [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from MetricsTest [ RUN ] MetricsTest.Master [ OK ] MetricsTest.Master (211 ms) [--] 1 test from MetricsTest (211 ms total) [--] Global test environment tear-down [==] 1 test from 1 test case ran. (244 ms total) [ PASSED ] 1 test 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 44058: Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44058/ --- (Updated 三月 2, 2016, 4:59 a.m.) Review request for mesos, Greg Mann, haosdent huang, and Jie Yu. Summary (updated) - Add metrics for {RESERVE, UNRESERVE, CREATE, DESTROY} offer operation Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description (updated) --- Signed-off-by: Fan Du <fan...@intel.com> Diffs (updated) - src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 Diff: https://reviews.apache.org/r/44058/diff/ Testing --- 1. make check on Centos-7 (3.10.0-123.el7.x86_640 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du
Re: Review Request 44058: Add metrics for {RESERVE, UNRESERVE} and {CREATE, DESTROY} offer operation
> On 二月 26, 2016, 9:34 a.m., Mesos ReviewBot wrote: > > Bad patch! > > > > Reviews applied: [44058] > > > > Failed command: ./support/apply-review.sh -n -r 44058 > > > > Error: > > 2016-02-26 09:34:14 URL:https://reviews.apache.org/r/44058/diff/raw/ > > [4122/4122] -> "44058.patch" [1] > > Total errors found: 0 > > Checking 3 files > > Error: Commit message summary (the first line) must not exceed 72 > > characters. > > > > Full log: https://builds.apache.org/job/mesos-reviewbot/11661/console Already rebased by rewriting commit message. Sorry for the noise. - fan --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44058/#review120849 --- On 二月 26, 2016, 7:19 a.m., fan du wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44058/ > --- > > (Updated 二月 26, 2016, 7:19 a.m.) > > > Review request for mesos, Greg Mann, haosdent huang, and Jie Yu. > > > Bugs: MESOS-4492 > https://issues.apache.org/jira/browse/MESOS-4492 > > > Repository: mesos > > > Description > --- > > Add metrics for {RESERVE, UNRESERVE} and {CREATE, DESTROY} offer operation > > > Diffs > - > > src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 > src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 > src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 > > Diff: https://reviews.apache.org/r/44058/diff/ > > > Testing > --- > > 1. make check on Centos-7 (3.10.0-123.el7.x86_640 > 2. Verify its functionality with 'reserve' http endpoint as an test case > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 0.0, > "master/messages_unreserve_resource": 0.0, > > > # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ > { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 > },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST > ipdc02-kvm-guest2:5050/master/reserve > HTTP/1.1 200 OK > Date: Fri, 26 Feb 2016 19:59:01 GMT > Content-Length: 0 > > # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | > grep reserve > "master/messages_reserve_resource": 1.0, > "master/messages_unreserve_resource": 0.0, > > > Thanks, > > fan du > >
Review Request 44058: Add metrics for {RESERVE, UNRESERVE} and {CREATE, DESTROY} offer operation
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44058/ --- Review request for mesos, Greg Mann, haosdent huang, and Jie Yu. Bugs: MESOS-4492 https://issues.apache.org/jira/browse/MESOS-4492 Repository: mesos Description --- Add metrics for {RESERVE, UNRESERVE} and {CREATE, DESTROY} offer operation Diffs - src/master/master.cpp 8d6d3c6468c6b85fe09c33cf9747cc3d1f515ab9 src/master/metrics.hpp 9d201fcce1c46a890c86a889ab31029f9a061561 src/master/metrics.cpp 30c091198a8fdd6d6a957a351dc37d3dae7788e4 Diff: https://reviews.apache.org/r/44058/diff/ Testing --- 1. make check on Centos-7 (3.10.0-123.el7.x86_640 2. Verify its functionality with 'reserve' http endpoint as an test case # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 0.0, "master/messages_unreserve_resource": 0.0, # curl -i -d slaveId=6250553a-2f39-4a92-9073-4618d130f433-S1 -d resources='[ { "name": "cpus", "type": "SCALAR","scalar": { "value": 1 },"reservation":{"principal": "XiaoHaHa"}} ]' -X POST ipdc02-kvm-guest2:5050/master/reserve HTTP/1.1 200 OK Date: Fri, 26 Feb 2016 19:59:01 GMT Content-Length: 0 # curl http://ipdc02-kvm-guest2:5050/metrics/snapshot | python -mjson.tool | grep reserve "master/messages_reserve_resource": 1.0, "master/messages_unreserve_resource": 0.0, Thanks, fan du