Improving benchmark

This commit is contained in:
David Négrier 2020-10-21 14:55:18 +02:00
parent 54fd429952
commit 9ec5dc093c
4 changed files with 526 additions and 1784 deletions

View file

@ -76,10 +76,12 @@ class ConnectionManager {
await Axios.get(`${API_URL}/verify`, {params: {token}});
}
private async anonymousLogin(): Promise<void> {
public async anonymousLogin(isBenchmark: boolean = false): Promise<void> {
const data = await Axios.post(`${API_URL}/anonymLogin`).then(res => res.data);
this.localUser = new LocalUser(data.userUuid, data.authToken, []);
localUserStore.saveUser(this.localUser);
if (!isBenchmark) { // In benchmark, we don't have a local storage.
localUserStore.saveUser(this.localUser);
}
}
public initBenchmark(): void {