- Timestamp:
- 03/31/11 00:29:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/pyregfi-smoketest.py
r218 r219 82 82 for k in hive: 83 83 for v in k.values: 84 d = v. data84 d = v.fetch_data() 85 85 if d == None: 86 86 data_stat += 0.1 … … 90 90 data_stat += d/2.0**64 91 91 92 d = v. data_raw92 d = v.fetch_raw_data() 93 93 if d == None: 94 94 dataraw_stat += 0.1 … … 133 133 134 134 135 # Iterates hive gathering stats about security and classname records 136 def iterFetchRelated(hive): 137 security_stat = 0.0 138 classname_stat = 0.0 139 modified_stat = 0.0 140 141 for k in hive: 142 cn = k.fetch_classname() 143 if cn == None: 144 classname_stat += 0.000001 145 elif type(cn) == bytearray: 146 classname_stat += len(cn)/2**32 147 else: 148 classname_stat += len(cn) 149 150 modified_stat += k.modified 151 152 print(" Security stat: %f" % security_stat) 153 print(" Classname stat: %f" % classname_stat) 154 print(" Modified stat: %f" % modified_stat) 155 135 156 if len(sys.argv) < 2: 136 157 usage() … … 138 159 139 160 140 #tests = [("iterTallyNames",iterTallyNames),("iterParentWalk",iterParentWalk),("iterTallyData",iterTallyData), ]141 tests = [(" recurseKeyTally",recurseKeyTally),("iterParentWalk",iterParentWalk),]161 #tests = [("iterTallyNames",iterTallyNames),("iterParentWalk",iterParentWalk),("iterTallyData",iterTallyData),("recurseKeyTally",recurseKeyTally),("iterFetchRelated",iterFetchRelated),] 162 tests = [("iterFetchRelated",iterFetchRelated),] 142 163 143 164 files = []
Note: See TracChangeset
for help on using the changeset viewer.