in lib/analysis.py [0:0]
def createResultsTemplate(config):
template = {}
for branch in config['branches']:
template[branch] = {}
for segment in config['segments']:
template[branch][segment] = {
"histograms": {},
"pageload_event_metrics": {}
}
for histogram in config['histograms']:
hist_name = histogram.split(".")[-1]
if config['histograms'][histogram]['kind'] == 'categorical':
template[branch][segment]["histograms"][hist_name] = createCategoricalTemplate()
else:
template[branch][segment]["histograms"][hist_name] = createNumericalTemplate()
for metric in config["pageload_event_metrics"]:
template[branch][segment]["pageload_event_metrics"][metric] = createNumericalTemplate()
return template