Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-14 Thread Abhishek Dasgupta


> On Sept. 14, 2016, 12:26 a.m., Anand Mazumdar wrote:
> > src/scheduler/scheduler.cpp, line 744
> > 
> >
> > hmm, this won't quite work for the scheduler library i.e. the messages 
> > metric would always be 0.
> > 
> > The library uses the `Connection` abstraction that wraps a socket under 
> > the hood and it does not go through the libprocess `MessageEvent` handler 
> > route. 
> > 
> > A possible solution might be to add the metric for messages directly in 
> > the `Connection` abstraction itself?

Yeah, message_queue metric has value of 0 even in case of sched.cpp. i didn't 
find any MessageEvent is getting used in scheduler library/driver. May be I am 
wrong. But message_queue is measured in old scheduler driver as well so I 
decided to introduce it though it is having 0 value. 

So, as per your comment, as we are sending subscribe.send() call and 
non-subscribe.send() call in scheduler library, we can initiate a counter 
metrics in Connection and increment it in Connection::send(). Is this the 
approach we are going to follow?

Also, as message_queue metric is giving 0 value for scheduler driver as well, 
are we going to introduce some new logics to collect message metrics there??

I will raise new issues based on your answer.


- Abhishek


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


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-13 Thread Anand Mazumdar

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




src/scheduler/scheduler.cpp (line 744)


hmm, this won't quite work for the scheduler library i.e. the messages 
metric would always be 0.

The library uses the `Connection` abstraction that wraps a socket under the 
hood and it does not go through the libprocess `MessageEvent` handler route. 

A possible solution might be to add the metric for messages directly in the 
`Connection` abstraction itself?


- Anand Mazumdar


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-09 Thread Vinod Kone


> On Sept. 8, 2016, 11:48 a.m., Vinod Kone wrote:
> > src/tests/scheduler_tests.cpp, lines 373-380
> > 
> >
> > oh i didn't mean to add a comment about what these metrics "mean". i 
> > meant which event is this exactly (e.g., is it the heartbeat event).
> 
> Abhishek Dasgupta wrote:
> Vinod, in this test there is no message event. The assertion is to 
> validate if `scheduler/event_queue_messages` and 
> `scheduler/event_queue_dispatch` is present in metrics JSON. However, in this 
> particular test the value for `scheduler/event_queue_dispatch` is 1.0 and 
> that is due to `subscribe` call. So, for `scheduler/event_queue_dispatch`, I 
> can write `// Dispatch event due to Subscribe call.` But for `EXPECT_EQ(1u, 
> metrics.values.count("scheduler/event_queue_messages"));`, there is no event 
> in the current test that is generating any MessageEvent. Any suggestion what 
> should we write as a comment for this? As I can find, heartbeat event is not 
> a MessageEvent. Am I missing something??

I see. This is just testing that the metric exists and not its value. Never 
mind them. LGTM.


- Vinod


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


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-08 Thread Abhishek Dasgupta


> On Sept. 8, 2016, 11:48 a.m., Vinod Kone wrote:
> > src/tests/scheduler_tests.cpp, lines 373-380
> > 
> >
> > oh i didn't mean to add a comment about what these metrics "mean". i 
> > meant which event is this exactly (e.g., is it the heartbeat event).

Vinod, in this test there is no message event. The assertion is to validate if 
`scheduler/event_queue_messages` and `scheduler/event_queue_dispatch` is 
present in metrics JSON. However, in this particular test the value for 
`scheduler/event_queue_dispatch` is 1.0 and that is due to `subscribe` call. 
So, for `scheduler/event_queue_dispatch`, I can write `// Dispatch event due to 
Subscribe call.` But for `EXPECT_EQ(1u, 
metrics.values.count("scheduler/event_queue_messages"));`, there is no event in 
the current test that is generating any MessageEvent. Any suggestion what 
should we write as a comment for this? As I can find, heartbeat event is not a 
MessageEvent. Am I missing something??


- Abhishek


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


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-08 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [51501]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker_build.sh

- Mesos ReviewBot


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-08 Thread Vinod Kone

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




src/tests/scheduler_tests.cpp (lines 370 - 377)


oh i didn't mean to add a comment about what these metrics "mean". i meant 
which event is this exactly (e.g., is it the heartbeat event).


- Vinod Kone


On Sept. 6, 2016, 8:53 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Sept. 6, 2016, 8:53 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-06 Thread Abhishek Dasgupta

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

(Updated Sept. 6, 2016, 8:53 p.m.)


Review request for mesos, Anand Mazumdar and Vinod Kone.


Bugs: MESOS-6080
https://issues.apache.org/jira/browse/MESOS-6080


Repository: mesos


Description (updated)
---

Exposed metrics scheduler/event_queue_messages(size of
message queue) and scheduler/event_queue_dispatches
(size of dispatch queue) in scheduler library.


Diffs
-

  src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
  src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 

Diff: https://reviews.apache.org/r/51501/diff/


Testing
---

On Ubuntu 16.04
sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check


Thanks,

Abhishek Dasgupta



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-06 Thread Abhishek Dasgupta

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

(Updated Sept. 6, 2016, 8:52 p.m.)


Review request for mesos, Anand Mazumdar and Vinod Kone.


Bugs: MESOS-6080
https://issues.apache.org/jira/browse/MESOS-6080


Repository: mesos


Description (updated)
---

Exposed metrics in scheduler library.


Diffs (updated)
-

  src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
  src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 

Diff: https://reviews.apache.org/r/51501/diff/


Testing
---

On Ubuntu 16.04
sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check


Thanks,

Abhishek Dasgupta



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-09-06 Thread Vinod Kone

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


Fix it, then Ship it!





src/tests/scheduler_tests.cpp (lines 358 - 359)


this doesn't seem relevant. kill this assertion.



src/tests/scheduler_tests.cpp (lines 373 - 374)


for posterity, can you add comments on what this message and dispatch 
events are?


- Vinod Kone


On Aug. 29, 2016, 7:21 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Aug. 29, 2016, 7:21 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Re: Review Request 51501: Exposed metrics in scheduler library.

2016-08-29 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [51501]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker_build.sh

- Mesos ReviewBot


On Aug. 29, 2016, 7:21 p.m., Abhishek Dasgupta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51501/
> ---
> 
> (Updated Aug. 29, 2016, 7:21 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-6080
> https://issues.apache.org/jira/browse/MESOS-6080
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Exposed metrics scheduler/event_queue_messages(size of
> message queue) and scheduler/event_queue_dispatches
> (size of dispatch queue) in scheduler library.
> 
> 
> Diffs
> -
> 
>   src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
>   src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 
> 
> Diff: https://reviews.apache.org/r/51501/diff/
> 
> 
> Testing
> ---
> 
> On Ubuntu 16.04
> sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>



Review Request 51501: Exposed metrics in scheduler library.

2016-08-29 Thread Abhishek Dasgupta

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

Review request for mesos, Anand Mazumdar and Vinod Kone.


Bugs: MESOS-6080
https://issues.apache.org/jira/browse/MESOS-6080


Repository: mesos


Description
---

Exposed metrics scheduler/event_queue_messages(size of
message queue) and scheduler/event_queue_dispatches
(size of dispatch queue) in scheduler library.


Diffs
-

  src/scheduler/scheduler.cpp 276ed10bd439c4a7830447bec5053292fb2ca4e7 
  src/tests/scheduler_tests.cpp 931c1857f1ab454c67eece2f34c4649a426178de 

Diff: https://reviews.apache.org/r/51501/diff/


Testing
---

On Ubuntu 16.04
sudo GTEST_FILTER="*SchedulerTest.MetricsEndpoint*" make -j4 check


Thanks,

Abhishek Dasgupta