cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laszlo Hornyak" <laszlo.horn...@gmail.com>
Subject Re: Review Request 13901: fix long cast to double
Date Thu, 29 Aug 2013 13:07:10 GMT


> On Aug. 29, 2013, 12:40 p.m., Wei Zhou wrote:
> > It looks the type of varieties in vmStats class need to be changed as well.

Hi Wei,

VmStatsEntry.networkReadKBs and other statistics information are already double. I think that
is good, the problem was that at the division of the long values another long was created
which was then casted to double, and therefore it lost precision, e.g. values below 0.9 kb
was truncated down to 0.
You can give it a try and modify the values back to long, it will make the test included in
the patch fail because the values under 1kb are truncated.


- Laszlo


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


On Aug. 29, 2013, 12:26 p.m., Laszlo Hornyak wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13901/
> -----------------------------------------------------------
> 
> (Updated Aug. 29, 2013, 12:26 p.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk and Wei Zhou.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> - the result of dividing long with long resulted in loss of precision both for network
and IO
> - unit tests included
> 
> 
> Diffs
> -----
> 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
a156ae6 
>   plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
3640030 
> 
> Diff: https://reviews.apache.org/r/13901/diff/
> 
> 
> Testing
> -------
> 
> unit test included
> 
> 
> Thanks,
> 
> Laszlo Hornyak
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message