log op count

master
JoYo 2019-02-24 07:14:29 +00:00
parent 38706feff6
commit 8d8df2ab5a
1 changed files with 3 additions and 2 deletions

View File

@ -6,9 +6,8 @@ from sqlalchemy import LargeBinary, Column, ForeignKey, Integer, String, DateTim
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relationship, backref
from sqlalchemy.orm.collections import attribute_mapped_collection
import json
from .disassemble import objdump
from .disassemble import objdump, disasm
now = '{0:%Y%m%dT%H%M%S}'.format(datetime.utcnow())
Base = declarative_base()
@ -49,6 +48,8 @@ class ScrapNode(Base):
values = {
'checksum': self.checksum,
'length': self.length,
# todo remove for performance
'operations': len(disasm(self.image)),
'parent_id': self.parent_id,
'id': self.id,
}