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

Ship it!



src/webui/master/static/js/app.js
<https://reviews.apache.org/r/15579/#comment56042>

    Good call, here's how we set up the variables in bytes.hpp, seems very 
obviously correct, maybe we could to the same here?
    
      static const uint64_t BYTES = 1;
      static const uint64_t KILOBYTES = 1024 * BYTES;
      static const uint64_t MEGABYTES = 1024 * KILOBYTES;
      static const uint64_t GIGABYTES = 1024 * MEGABYTES;
      static const uint64_t TERABYTES = 1024 * GIGABYTES;


- Ben Mahler


On Nov. 15, 2013, 6:13 p.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15579/
> -----------------------------------------------------------
> 
> (Updated Nov. 15, 2013, 6:13 p.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Saved KB/MB/GB bytes as constants to save multiplication.
> 
> Each time the 'dataSize' filter was called, the function did lots of
> multiplication to get bytes per KB, MB, and GB to determine how to
> print the string.
> 
> Moving the constants outside the function returned by the filter means
> the multiplication is done only one time on app start up instead of in
> each call.
> 
> * Added 1 digit to the right of the decimal point for GB. 6.5 GB is
>   very different from 7 GB.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/js/app.js 163c50b6cb88f33a23a1a3446d1a88070be26eab 
> 
> Diff: https://reviews.apache.org/r/15579/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ross Allen
> 
>

Reply via email to