-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stats logger #10
base: main
Are you sure you want to change the base?
Stats logger #10
Conversation
backend/src/statsLogger.ts
Outdated
@@ -0,0 +1,282 @@ | |||
import { SqlAttribute, TableSchema } from './tableSchema'; | |||
import { createTableDB, queryDB, updateDB } from './storage'; | |||
import { update } from './match'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
I also think it would be interesting to store a timestamp for each match (maybe even two, one for the beginning and one for the end ?) |
Not really necessary, i think, but it could be a future improvement |
If we don't record when the matches happened, why does it even make sense to record anything about matches. The data won't make any sense if you can't sort them in the order that they happened during the lan |
@@ -17,34 +18,60 @@ export const setup = async () => { | |||
{ name: 'tDiff', type: 'INTEGER' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to remove this one
if (!playerExists) { | ||
await Storage.insertDB( | ||
StatsLogger.PLAYERS_TABLE, | ||
new Map<string, string | number>([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff, hspct and adr should be removed here as well
Add stats logging