mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: include data
This commit is contained in:
1 parent
9edc2cffad
commit
0443a92693
1 file changed
+7
-6
+7
-6
@@ -45,8 +45,8 @@ const playerIds: Record<Region, number[][]> = {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
let regionIndex = 0;
|
let regionIndex = 0;
|
||||||
let checkedPlayers = 0;
|
let scanned_players = 0;
|
||||||
let includedPlayers = 0;
|
let sampled_players = 0;
|
||||||
const availableRegions = [...REGIONS];
|
const availableRegions = [...REGIONS];
|
||||||
const tankIds: number[] = [];
|
const tankIds: number[] = [];
|
||||||
const tanksSorted: Record<number, AverageDefinitionsAllStats[]> = {};
|
const tanksSorted: Record<number, AverageDefinitionsAllStats[]> = {};
|
||||||
@@ -63,7 +63,7 @@ times(THREADS, async () => {
|
|||||||
const accountInfo = await getAccountInfo(region, ids, undefined, {
|
const accountInfo = await getAccountInfo(region, ids, undefined, {
|
||||||
fields: 'last_battle_time,statistics.all.battles',
|
fields: 'last_battle_time,statistics.all.battles',
|
||||||
});
|
});
|
||||||
checkedPlayers += ids.length;
|
scanned_players += ids.length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass rates
|
* Pass rates
|
||||||
@@ -81,7 +81,7 @@ times(THREADS, async () => {
|
|||||||
info.statistics.all.battles > MIN_BATTLES
|
info.statistics.all.battles > MIN_BATTLES
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
includedPlayers += filteredIds.length;
|
sampled_players += filteredIds.length;
|
||||||
const players = await Promise.all(
|
const players = await Promise.all(
|
||||||
filteredIds.map((id) => getTankStats(region, id)),
|
filteredIds.map((id) => getTankStats(region, id)),
|
||||||
);
|
);
|
||||||
@@ -116,7 +116,7 @@ times(THREADS, async () => {
|
|||||||
|
|
||||||
async function postWork() {
|
async function postWork() {
|
||||||
console.log(
|
console.log(
|
||||||
`Generating statistics based off ${includedPlayers.toLocaleString()} players (${checkedPlayers.toLocaleString()} checked in total) and ${tankIds.length} tanks...`,
|
`Generating statistics based off ${sampled_players.toLocaleString()} players (${scanned_players.toLocaleString()} checked in total) and ${tankIds.length} tanks...`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const averages: Record<number, AverageDefinitionsEntry> = {};
|
const averages: Record<number, AverageDefinitionsEntry> = {};
|
||||||
@@ -172,7 +172,8 @@ async function postWork() {
|
|||||||
|
|
||||||
const averageDefinitions = {
|
const averageDefinitions = {
|
||||||
averages,
|
averages,
|
||||||
players: includedPlayers,
|
sampled_players,
|
||||||
|
scanned_players,
|
||||||
} satisfies AverageDefinitions;
|
} satisfies AverageDefinitions;
|
||||||
|
|
||||||
commitAssets(
|
commitAssets(
|
||||||
|
|||||||
Reference in new issue
Block a user