You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Erik van Roode (JIRA)" <ji...@apache.org> on 2014/08/22 21:36:12 UTC
[jira] [Created] (AURORA-660) Resource consumption display format
for floats does not restrict #decimals
Erik van Roode created AURORA-660:
-------------------------------------
Summary: Resource consumption display format for floats does not restrict #decimals
Key: AURORA-660
URL: https://issues.apache.org/jira/browse/AURORA-660
Project: Aurora
Issue Type: Story
Components: Scheduler
Reporter: Erik van Roode
Priority: Minor
Resource consumption displays CPU as a float without #deciaml contraints, RAM and Disk with 2 decimals.
running 8 instances with Resources(cpu = 0.09, disk = 32*MB, ram = 64*MB)
Not sure screenshot is going to work, some copy&base for relevant bits:
viewing /scheduler/role
Resource Production Consumption Quota Non-Production Consumption
CPU 0.7199999999999999 cores 1 cores 0.7199999999999999 cores
RAM 512.00 MiB 1.00 GiB 512.00 MiB
Disk 256.00 MiB 1.00 GiB 256.00 MiB
Formatting is done in src/main/resources/org/apache/aurora/scheduler/http/ui/js/filters.js
The scaleMb function doesn't seem to ever create numbers that aren't effectively integer (integer division truncates to int?)
IMO toCores is missing a ".toFixed(N).toString()" afetr the "return count".
I'd argue RAM/Disk could just use zero decimals, and CPU only a few decimals, 2 or 3 perhaps?
--
This message was sent by Atlassian JIRA
(v6.2#6252)