Skip to content

dSentra-foundation/size-compute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Size Compute

Motivation

This can be used to compute the allocated memory of N instances of a defined class.

Sometimes we need to know how to structure our data inside a class (or multiple classes). One of the questions when thinking about this problem is the overhead created by composing/splitting classes.

This is a util that computes the total memory allocation of N instances of a class.

What

There are two files here:

  • main.py this will to the computation
  • my_class.py in this file we define all the members of the instance we want to measure

How

main.py instantiates num_instances of my_class and outputs the result to the terminal.

In order to run multiple computations we should organize ourselves in a workflow that is not destructive for previous/future test cases.

Proposed workflow

We should use the main branch as an immutable starting point for all our computations.

When we need to create another computation case:

  • we branch from main
  • we give the branch a obvious name eg.: calculate-size-of-validators-merged
  • we edit the my_class.py file, fill in all the required data and stubs
  • we run main with python main.py

We should never merge back to main, let's keep things separated.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages