Add miner shameboard calculations
This commit is contained in:
@@ -9,6 +9,7 @@ const UNKNOWN_PROFILE: MinerProfile = {
|
||||
ownerLabel: "unknown",
|
||||
locationLabel: "unknown",
|
||||
expectedHashrateThs: 0,
|
||||
watts: 0,
|
||||
workerNameMatchers: [],
|
||||
};
|
||||
|
||||
@@ -119,6 +120,8 @@ export function parseClientsHtml(html: string): MinerStat[] {
|
||||
nickname: profile.nickname,
|
||||
model: profile.model,
|
||||
location: profile.locationLabel,
|
||||
expectedHashrateThs: profile.expectedHashrateThs,
|
||||
watts: profile.watts,
|
||||
hashrateThs,
|
||||
hashrateAgeS,
|
||||
lastShareAgeS,
|
||||
|
||||
@@ -12,6 +12,7 @@ export const MINER_PROFILES: readonly MinerProfile[] = [
|
||||
ownerLabel: "shared",
|
||||
locationLabel: "Site A",
|
||||
expectedHashrateThs: 4.5,
|
||||
watts: 80,
|
||||
workerNameMatchers: ["nerdqaxe", "qu4ck", "quack"],
|
||||
},
|
||||
{
|
||||
@@ -21,6 +22,7 @@ export const MINER_PROFILES: readonly MinerProfile[] = [
|
||||
ownerLabel: "shared",
|
||||
locationLabel: "Site A",
|
||||
expectedHashrateThs: 1.2,
|
||||
watts: 18,
|
||||
workerNameMatchers: ["bitaxe", "p1xel", "pixel"],
|
||||
},
|
||||
{
|
||||
@@ -30,6 +32,7 @@ export const MINER_PROFILES: readonly MinerProfile[] = [
|
||||
ownerLabel: "shared",
|
||||
locationLabel: "Site B",
|
||||
expectedHashrateThs: 4.0,
|
||||
watts: 140,
|
||||
workerNameMatchers: ["nano", "nano3", "n4n0"],
|
||||
},
|
||||
{
|
||||
@@ -39,6 +42,7 @@ export const MINER_PROFILES: readonly MinerProfile[] = [
|
||||
ownerLabel: "shared",
|
||||
locationLabel: "Site B",
|
||||
expectedHashrateThs: 37.0,
|
||||
watts: 800,
|
||||
workerNameMatchers: ["mini", "mini3", "m1n1"],
|
||||
},
|
||||
] as const;
|
||||
|
||||
@@ -5,6 +5,7 @@ export type MinerProfile = {
|
||||
ownerLabel: string;
|
||||
locationLabel: string;
|
||||
expectedHashrateThs: number;
|
||||
watts: number;
|
||||
workerNameMatchers: readonly string[];
|
||||
};
|
||||
|
||||
@@ -14,6 +15,8 @@ export type MinerStat = {
|
||||
nickname: string;
|
||||
model: string;
|
||||
location: string;
|
||||
expectedHashrateThs: number;
|
||||
watts: number;
|
||||
hashrateThs: number;
|
||||
hashrateAgeS: number | null;
|
||||
lastShareAgeS: number | null;
|
||||
|
||||
Reference in New Issue
Block a user