Functions | |
def | hasNames (features) |
def | totalData (features, profile) |
def | findAndRemove (profile, name) |
def | refName (name) |
def | refFeatures (names) |
def | mergeHeaders (features, skipFirst=True) |
def | addReference (row, reference) |
def | mergeRow (reference, profile, diff) |
def | alignData (reference, profile, threshold) |
def | main () |
Variables | |
list | allFeatures = ['name', 'timeMs', 'averageMs', 'percentage'] |
string | defaultFeatures = ",".join(allFeatures) |
list | descriptions = ['layer name', 'total layer time', 'average layer time', 'percentage of total time'] |
featuresDescription = pu.combineDescriptions('Features are (times in ms):', allFeatures, descriptions) | |
def profiler.hasNames | ( | features | ) |
Check if the name is included in the set
def profiler.totalData | ( | features, | |
profile | |||
) |
Add row at the bottom with the total
def profiler.findAndRemove | ( | profile, | |
name | |||
) |
Find named row in profile and remove
def profiler.refName | ( | name | ) |
Add prefix ref to name
def profiler.refFeatures | ( | names | ) |
Add prefix ref to features names
def profiler.mergeHeaders | ( | features, | |
skipFirst = True |
|||
) |
Duplicate feature names for reference and target profile
def profiler.addReference | ( | row, | |
reference | |||
) |
Add reference results to results dictionary
def profiler.mergeRow | ( | reference, | |
profile, | |||
diff | |||
) |
Merge reference and target profile results into a single row
def profiler.alignData | ( | reference, | |
profile, | |||
threshold | |||
) |
Align and merge reference and target profiles
def profiler.main | ( | ) |
list profiler.allFeatures = ['name', 'timeMs', 'averageMs', 'percentage'] |
string profiler.defaultFeatures = ",".join(allFeatures) |
list profiler.descriptions = ['layer name', 'total layer time', 'average layer time', 'percentage of total time'] |
profiler.featuresDescription = pu.combineDescriptions('Features are (times in ms):', allFeatures, descriptions) |