XMLWordPrintable

#### Details

• Type: Story
• Status: Invalid
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
2
• Team:
Architecture
• Urgent?:
No

#### Description

Lee Kelvin was talking about analyzing the contents of the task metadata to look at memory usage and noted that his numbers had to be scaled by 1024.

This horrifies me because it now seems that we are storing task metadata (and have been for years) where you need to know where you ran it in order to work out how much memory it was using.

In another part of utils we have:

 unit = u.kibibyte if platform.system() == "Linux" else u.byte 

so the fix to logInfo is trivial. What I don't know is how I can fix it without everyone's scripts breaking. We can't let this situation persist though and nothing in the code says 1024 byte units. MacOS returns bytes (and I don't know what freebsd returns).

Do I put a version number into the logInfo data structure? Do I put a unit string in there?

#### Activity

Hide
Krzysztof Findeisen added a comment -

This is a duplicate of DM-20970. Note that the utils code is incomplete, as there is at least a third case (SunOS).

Show
Krzysztof Findeisen added a comment - This is a duplicate of DM-20970 . Note that the utils code is incomplete, as there is at least a third case (SunOS) .
Hide
Kian-Tat Lim added a comment -

I think you need a version even if you have a unit string, so putting in a version and standardizing the units sounds best.

Show
Kian-Tat Lim added a comment - I think you need a version even if you have a unit string, so putting in a version and standardizing the units sounds best.
Hide
Tim Jenness added a comment -

Thanks for pointing out the duplication. Now I'm wondering if we can justify putting some smarts into the thing we store in TaskMetadata to allow the units to be attached. Currently TaskMetadata is effectively a special dict that has no idea about content but I'll see what happens if I store an astropy Quantity in there.

Show
Tim Jenness added a comment - Thanks for pointing out the duplication. Now I'm wondering if we can justify putting some smarts into the thing we store in TaskMetadata to allow the units to be attached. Currently TaskMetadata is effectively a special dict that has no idea about content but I'll see what happens if I store an astropy Quantity in there.

#### People

Assignee:
Tim Jenness
Reporter:
Tim Jenness
Watchers:
Kian-Tat Lim, Krzysztof Findeisen, Lee Kelvin, Tim Jenness