import autobind from 'autobind-decorator'; import Chart, { DeepPartial } from '../../core'; import { SchemaType } from '../../../../misc/schema'; import { name, schema } from '../schemas/network'; type NetworkLog = SchemaType; export default class NetworkChart extends Chart { constructor() { super(name, schema); } @autobind protected genNewLog(latest: NetworkLog): DeepPartial { return {}; } @autobind protected async fetchActual(): Promise> { return {}; } @autobind public async update(incomingRequests: number, time: number, incomingBytes: number, outgoingBytes: number) { const inc: DeepPartial = { incomingRequests: incomingRequests, totalTime: time, incomingBytes: incomingBytes, outgoingBytes: outgoingBytes }; await this.inc(inc); } }