MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / test_stats

Function test_stats

tests/testing/view_image_tests.py:186–201  ·  view source on GitHub ↗

Compute stats bar data for a test.

(test)

Source from the content-addressed store, hash-verified

184 return stats
185
186def test_stats(test):
187 '''
188 Compute stats bar data for a test.
189 '''
190 total_count = len(test['images'])
191 if total_count == 0:
192 return []
193 stats = []
194 for result, color in zip(['PASSED', 'FAILED'], ['#32b643', '#e85600']):
195 count = len(list(filter(lambda i: i['success'] == (result == 'PASSED'), test['images'])))
196 stats.append({
197 'title': result,
198 'percentage': round(100 * count / total_count, 1),
199 'color': color
200 })
201 return stats
202
203def create_jeri_data(result_image, ref_image, error_image, extra_metrics=['L1', 'L2', 'MAPE', 'MRSE', 'SMAPE', 'SSIM']):
204 '''

Callers 1

catch_allFunction · 0.85

Calls 3

listClass · 0.85
roundFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected