insane statistics

This commit is contained in:
jimmylee 2020-10-19 15:37:13 -07:00
parent 626aa5f5c0
commit ce236ed718
2 changed files with 11 additions and 2 deletions

View File

@ -31,6 +31,15 @@ export default async (req, res) => {
totals.costFormatted = Strings.formatAsFilecoinConversion(totals.cost);
totals.sizeFormatted = Strings.bytesToSize(totals.size);
totals.averages = {
costPerDealFIL: Strings.formatAsFilecoinConversion(totals.cost / totals.deals),
costPerDealAttoFIL: totals.cost / totals.deals,
sizePerDealBytes: totals.size / totals.deals,
sizePerDealBytesFormatted: Strings.bytesToSize(totals.size / totals.deals),
costPerByteAttoFIL: totals.cost / totals.size,
costPerByteFIL: Strings.formatAsFilecoinConversion(totals.cost / totals.size),
costPerGBFIL: Strings.formatAsFilecoinConversion((totals.cost / totals.size) * 1073741824),
};
if (!response) {
return res.status(500).send({

View File

@ -56,7 +56,7 @@ const run = async () => {
Logs.taskTimeless(`Fetching every user ...`);
const response = await Data.getEveryUser(false);
const storageUsers = [];
let storageUsers = [];
const writable = [];
const slateAddresses = [];
let bytes = 0;
@ -69,7 +69,7 @@ const run = async () => {
const user = response[i];
if (user.data.allow_automatic_data_storage) {
storageUsers.push(user);
storageUsers.unshift(user);
dealUsers = dealUsers + 1;
}