Skip to content

Commit

Permalink
chore: limit request number (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
hardfist authored Jan 6, 2025
1 parent ffd5191 commit d86196e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ class DataCenter {
const [benchmarkName, metric] = tag.split(" + ");
if (!this.cache[benchmarkName]) {
this.cache[benchmarkName] = await Promise.all(
this.index[benchmarkName].map(async date => {
// only get the latest 90 days metric for performance reason
this.index[benchmarkName].slice(-180).map(async date => {
const file = await fetch(
`${fetchPrefix}/${date}/${benchmarkName}.json`
).then(res => res.json());
Expand Down

0 comments on commit d86196e

Please sign in to comment.