Improve chart performance (#7360)

* wip

* wip

* wip

* wip

* wip

* Update chart.ts

* wip

* Improve server performance

* wip

* wip
This commit is contained in:
syuilo
2021-03-18 11:17:05 +09:00
committed by GitHub
parent 0d19c2d42e
commit 4f249159d3
32 changed files with 889 additions and 161 deletions

View File

@@ -21,6 +21,17 @@ export default class TestChart extends Chart<TestLog> {
};
}
@autobind
protected aggregate(logs: TestLog[]): TestLog {
return {
foo: {
total: logs[0].foo.total,
inc: logs.reduce((a, b) => a + b.foo.inc, 0),
dec: logs.reduce((a, b) => a + b.foo.dec, 0),
},
};
}
@autobind
protected async fetchActual(): Promise<DeepPartial<TestLog>> {
return {