support IUnit of Allocation Rate

Liu, Xin xxinliu at amazon.com
Mon Mar 28 23:36:54 UTC 2022


hi, Marcus,

Yes, I am looking for a general approach to combine two units and get a
compound unit. Is there any other scenarios besides B/s.

Or we treat B/s as a special case. I look up wikipedia, maybe it's not
an appalling hack to create a unit called "data-rate"
https://en.wikipedia.org/wiki/Data-rate_units. It has a clear
definition, symbol and scales.

I plan to create a map in UnitLookup. it maps MEMORY to MEMORY/s. does
it sound reasonable?

thanks,
--lx

On 3/28/22 5:19 AM, Marcus Hirt wrote:
> *CAUTION*: This email originated from outside of the organization. Do
> not click links or open attachments unless you can confirm the sender
> and know the content is safe.
> 
> 
> Hi Xin Liu,
> 
> Fixing this properly is probably a bit bigger. We'd probably want to
> have a compound unit and add support for compound units in a general way.
> 
> Kind regards,
> Marcus
> 
> On Mon, Mar 28, 2022 at 8:37 AM Liu, Xin <xxinliu at amazon.com
> <mailto:xxinliu at amazon.com>> wrote:
> 
>     Hi, Developers,
> 
>     I am new for the codebase of Java mission control. I would like to add
>     allocation Rate in Summary page(JMC-7301).
> 
>     I manage to extend aggregators ALLOC_INSIDE_TLAB_SUM and
>     ALLOC_OUTSIDE_TLAB_SUM. The duration is known from
>     TlabPage::visibleRange.
> 
>     The biggest challenge is to align with the new unit. IUnit of Allocation
>     Rate is B/s. I haven't found similar IUnit like that. Is there a way to
>     derive B/s from Memory?
> 
>     To display the correct unit of allocation rate, I create a new
>     LinearKindOfQuantity "memory bandwidth". The only difference of it from
>     memory is that its atom unit is B/s.
> 
>     Here is my attempt. sorry it looks awful. Any suggest to make it more
>     elegant?
> 
>     https://github.com/navyxliu/jmc/commit/b3cd19b1b6bb5cb93241b4dbb8086a6305fe4023#diff-d740b28fe16b17f85bf34790e5afc60eb0d2f39d7827f894184713430d74131bR793
>     <https://github.com/navyxliu/jmc/commit/b3cd19b1b6bb5cb93241b4dbb8086a6305fe4023#diff-d740b28fe16b17f85bf34790e5afc60eb0d2f39d7827f894184713430d74131bR793>
> 
> 
>     thanks,
>     --lx
> 
> 
> 
> 
> 


More information about the jmc-dev mailing list