adding lives action to the document of internal stats

This commit is contained in:
Cayo Puigdefabregas 2021-02-23 12:23:07 +01:00
parent e85b40c90f
commit 79902ee26d
2 changed files with 9 additions and 1 deletions

View File

@ -12,6 +12,7 @@ ml).
[1.0.5-beta]
## [1.0.5-beta]
- [addend] #124 adding endpoint for extract the internal stats of use
## [1.0.4-beta]
- [addend] #95 adding endpoint for check the hash of one report

View File

@ -413,7 +413,9 @@ class InternalStatsRow(OrderedDict):
for ac in self.actions:
self.is_snapshot(
self.is_deallocate(
self.is_allocate(ac)
self.is_live(
self.is_allocate(ac)
)
)
)
@ -422,6 +424,11 @@ class InternalStatsRow(OrderedDict):
self['Allocates'] += 1
return ac
def is_live(self, ac):
if ac.type == 'Live':
self['Lives'] += 1
return ac
def is_deallocate(self, ac):
if ac.type == 'Deallocate':
self['Deallocates'] += 1