kiner icon indicating copy to clipboard operation
kiner copied to clipboard

changing record_size to same value of previous one

Open lucasghelal opened this issue 3 years ago • 3 comments

inside of the function: flush_queue, the value of record_size is different from the previous one, they are in different formats.

lucasghelal avatar Oct 05 '22 22:10 lucasghelal

The sys.getsizeof not work with nested dict, so to solve that we need to create a function to iterate inside o a nested dict.

to solve that I'm using this function: get_size_in_bytes

lucasghelal avatar Oct 05 '22 22:10 lucasghelal

because we are dividing / 1048576, we are converting bytes to MiB

and because of that, we need to change the name of vars, which are using bytes in their names

lucasghelal avatar Oct 05 '22 23:10 lucasghelal

in short, we need to do those changes because we aren't getting the correct value of the same record (dict) when they are nested.

1: was put them in the same metric for all counts of records (record_size), in this case, MiB;

2: was create a function to get the correct value of a record;

3: changing the name o vars that are using byte -> mebibytes;

lucasghelal avatar Oct 05 '22 23:10 lucasghelal