This commit is contained in:
Dev Singh 2020-03-06 11:14:10 -06:00
parent 37109a4947
commit 864b27bc0c

View File

@ -176,16 +176,12 @@ def simplestats(data, test):
if(test == "regression_sigmoidal"):
return an.regression(list(range(len(data))), data, ['sig'])
def push_to_database(apikey, competition, results, metrics, pit):
def push_to_database(apikey, competition, results, pit):
for team in results:
d.push_team_tests_data(apikey, competition, team, results[team])
for team in metrics:
d.push_team_metrics_data(apikey, competition, team, metrics[team])
for variable in pit:
d.push_team_pit_data(apikey, competition, variable, pit[variable])
@ -279,6 +275,14 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
blu[team]["gl2"]["rd"] = blu[team]["gl2"]["rd"] + blu_gl2_delta["rd"]
blu[team]["gl2"]["vol"] = blu[team]["gl2"]["vol"] + blu_gl2_delta["vol"]
temp_vector = {}
temp_vector.update(red)
temp_vector.update(blu)
for team in temp_vector:
d.push_team_metrics_data(apikey, competition, team, temp_vector[team])
""" not functional for now
red_trueskill = []
blu_trueskill = []
@ -305,11 +309,6 @@ def metricsloop(tbakey, apikey, competition, timestamp): # listener based metric
"""
return_vector.update(red)
return_vector.update(blu)
return return_vector
def load_metrics(apikey, competition, match, group_name):
group = {}
@ -334,7 +333,7 @@ def load_metrics(apikey, competition, match, group_name):
elo = metrics["elo"]
gl2 = metrics["gl2"]
ts = metrics["trueskill"]
ts = metrics["ts"]
group[team] = {"elo": elo, "gl2": gl2, "ts": ts}