You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Shingo Omura <ev...@gmail.com> on 2013/11/08 07:54:06 UTC
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/
-----------------------------------------------------------
(Updated Nov. 8, 2013, 6:54 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
Summary (updated)
-----------------
refactor mesos-ps to display allocated cpu and used/allocated memory
Repository: mesos-git
Description
-------
I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
Diffs
-----
src/cli/mesos-ps f32c812
Diff: https://reviews.apache.org/r/15200/diff/
Testing
-------
tested on my laptop, single host deployment.
-(~/Documents/githubs/everpeace/mesos/build)-
$ ./bin/mesos.sh ps --master=192.168.33.1:5050
USER FRAMEWORK TASK SLAVE MEM TIME CPU(allocated)
omura echo5 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.090137 1
omura echo5 shingo-no-macbo... 9.0 MB/128.0 MB 00:00:02.983559 1
Thanks,
Shingo Omura
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/#review28674
-----------------------------------------------------------
Ship it!
Ship It!
- Ben Mahler
On Nov. 9, 2013, 2:22 a.m., Shingo Omura wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15200/
> -----------------------------------------------------------
>
> (Updated Nov. 9, 2013, 2:22 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
>
>
> Diffs
> -----
>
> src/cli/mesos-ps f32c812
>
> Diff: https://reviews.apache.org/r/15200/diff/
>
>
> Testing
> -------
>
> tested on my laptop, single host deployment.
> -(~/Documents/githubs/everpeace/mesos/build)-
> $ ./bin/mesos.sh ps --master=192.168.33.1:5050
> USER FRAMEWORK TASK SLAVE MEM TIME CPU (allocated)
> omura echo2 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.078403 1
> omura echo1 shingo-no-macbo... 8.0 MB/128.0 MB 00:00:00.134005 1
>
>
> Thanks,
>
> Shingo Omura
>
>
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/#review28675
-----------------------------------------------------------
Thanks Shingo, please mark this as submitted!
- Ben Mahler
On Nov. 9, 2013, 2:22 a.m., Shingo Omura wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15200/
> -----------------------------------------------------------
>
> (Updated Nov. 9, 2013, 2:22 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
>
>
> Diffs
> -----
>
> src/cli/mesos-ps f32c812
>
> Diff: https://reviews.apache.org/r/15200/diff/
>
>
> Testing
> -------
>
> tested on my laptop, single host deployment.
> -(~/Documents/githubs/everpeace/mesos/build)-
> $ ./bin/mesos.sh ps --master=192.168.33.1:5050
> USER FRAMEWORK TASK SLAVE MEM TIME CPU (allocated)
> omura echo2 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.078403 1
> omura echo1 shingo-no-macbo... 8.0 MB/128.0 MB 00:00:00.134005 1
>
>
> Thanks,
>
> Shingo Omura
>
>
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Shingo Omura <ev...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/
-----------------------------------------------------------
(Updated Nov. 9, 2013, 2:22 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
Repository: mesos-git
Description
-------
I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
Diffs
-----
src/cli/mesos-ps f32c812
Diff: https://reviews.apache.org/r/15200/diff/
Testing (updated)
-------
tested on my laptop, single host deployment.
-(~/Documents/githubs/everpeace/mesos/build)-
$ ./bin/mesos.sh ps --master=192.168.33.1:5050
USER FRAMEWORK TASK SLAVE MEM TIME CPU (allocated)
omura echo2 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.078403 1
omura echo1 shingo-no-macbo... 8.0 MB/128.0 MB 00:00:00.134005 1
Thanks,
Shingo Omura
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Shingo Omura <ev...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/
-----------------------------------------------------------
(Updated Nov. 9, 2013, 2:20 a.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
Changes
-------
changes for issues suggested by Ben Mahler.
Repository: mesos-git
Description
-------
I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
Diffs (updated)
-----
src/cli/mesos-ps f32c812
Diff: https://reviews.apache.org/r/15200/diff/
Testing
-------
tested on my laptop, single host deployment.
-(~/Documents/githubs/everpeace/mesos/build)-
$ ./bin/mesos.sh ps --master=192.168.33.1:5050
USER FRAMEWORK TASK SLAVE MEM TIME CPU(allocated)
omura echo5 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.090137 1
omura echo5 shingo-no-macbo... 9.0 MB/128.0 MB 00:00:02.983559 1
Thanks,
Shingo Omura
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Shingo Omura <ev...@gmail.com>.
> On Nov. 8, 2013, 6:42 p.m., Ben Mahler wrote:
> > src/cli/mesos-ps, line 28
> > <https://reviews.apache.org/r/15200/diff/2/?file=380818#file380818line28>
> >
> > 0?
_WIDTH contants means actually padding width.
CPU column is now the rightmost column. so padding is not needed.
I will remove this constants and rename constants name to _PADDING.
> On Nov. 8, 2013, 6:42 p.m., Ben Mahler wrote:
> > src/cli/mesos-ps, lines 104-130
> > <https://reviews.apache.org/r/15200/diff/2/?file=380818#file380818line104>
> >
> > Hey Shingo, what if instead of having two functions here (dataUnit and dataSize), it seems like we just want to format a byte variable into a string.
> >
> > If you look in src/webui/master/static/js/app.js we use a single function called dataSize that takes a byte amount and converts it to a string.
> >
> > PEP8 advocates for using snake_case for naming functions, so data_size would be better:
> > http://www.python.org/dev/peps/pep-0008/#function-names
> >
> > Does that sound better?
Oh, I forgot to modify them.....
I will change function names to snake_case :-)
At the first time, I planned that dataSize can accept data unit like this:
def data_unit(bytes):
<return appropriate size for example 'B', 'KB', and so on.>
def data_size(bytes, unit):
if unit == 'B':
return bytes
....
If data_size is like this, we can specify data unit independently.
But, I decided to print data unit which is induced by bytes.
Therefore, I will remove data_unit and modify data_size like app.js.
- Shingo
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/#review28559
-----------------------------------------------------------
On Nov. 8, 2013, 6:54 a.m., Shingo Omura wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15200/
> -----------------------------------------------------------
>
> (Updated Nov. 8, 2013, 6:54 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
>
>
> Diffs
> -----
>
> src/cli/mesos-ps f32c812
>
> Diff: https://reviews.apache.org/r/15200/diff/
>
>
> Testing
> -------
>
> tested on my laptop, single host deployment.
> -(~/Documents/githubs/everpeace/mesos/build)-
> $ ./bin/mesos.sh ps --master=192.168.33.1:5050
> USER FRAMEWORK TASK SLAVE MEM TIME CPU(allocated)
> omura echo5 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.090137 1
> omura echo5 shingo-no-macbo... 9.0 MB/128.0 MB 00:00:02.983559 1
>
>
> Thanks,
>
> Shingo Omura
>
>
Re: Review Request 15200: refactor mesos-ps to display allocated cpu and
used/allocated memory
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15200/#review28559
-----------------------------------------------------------
Great! Yeah we can think about % CPU usage later, for now this looks good! Just a few stylistic things left. :)
src/cli/mesos-ps
<https://reviews.apache.org/r/15200/#comment55363>
0?
src/cli/mesos-ps
<https://reviews.apache.org/r/15200/#comment55364>
Can you add a ':' after the TODO?
s/TODO(everpeace)/TODO(everpeace):/
src/cli/mesos-ps
<https://reviews.apache.org/r/15200/#comment55370>
Hey Shingo, what if instead of having two functions here (dataUnit and dataSize), it seems like we just want to format a byte variable into a string.
If you look in src/webui/master/static/js/app.js we use a single function called dataSize that takes a byte amount and converts it to a string.
PEP8 advocates for using snake_case for naming functions, so data_size would be better:
http://www.python.org/dev/peps/pep-0008/#function-names
Does that sound better?
src/cli/mesos-ps
<https://reviews.apache.org/r/15200/#comment55365>
s/CPU(allocated)/CPUS (allocated)/
- Ben Mahler
On Nov. 8, 2013, 6:54 a.m., Shingo Omura wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15200/
> -----------------------------------------------------------
>
> (Updated Nov. 8, 2013, 6:54 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Niklas Nielsen.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> I think it would be better mesos-ps reports allocated cpus and used/allocated memory.
>
>
> Diffs
> -----
>
> src/cli/mesos-ps f32c812
>
> Diff: https://reviews.apache.org/r/15200/diff/
>
>
> Testing
> -------
>
> tested on my laptop, single host deployment.
> -(~/Documents/githubs/everpeace/mesos/build)-
> $ ./bin/mesos.sh ps --master=192.168.33.1:5050
> USER FRAMEWORK TASK SLAVE MEM TIME CPU(allocated)
> omura echo5 shingo-no-macbo... 8.0 MB/1.0 GB 00:00:00.090137 1
> omura echo5 shingo-no-macbo... 9.0 MB/128.0 MB 00:00:02.983559 1
>
>
> Thanks,
>
> Shingo Omura
>
>