> 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
> 
>

Reply via email to