Skip to content

Commit

Permalink
Merge pull request #45 from grafana/bugfix/28-sparse-stats-graphed-in…
Browse files Browse the repository at this point in the history
…correctly

Bugfix/28 sparse stats graphed incorrectly
  • Loading branch information
szkiba authored Aug 18, 2023
2 parents a61a1cb + 5ede59b commit ecf801f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- feature/*
- bugfix/*

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion assets/brief/index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions assets/packages/brief/src/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Metrics {
pushOne (key, value) {
if (!this.values.hasOwnProperty(key)) {
this.values[key] = Array(this.length)
} else if (this.values[key].length < this.length) {
this.values[key][this.length-1] = undefined
}

this.values[key].push(roundTo(value, 4))
Expand Down
2 changes: 2 additions & 0 deletions assets/packages/ui/src/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Metrics {
pushOne (key, value) {
if (!this.values.hasOwnProperty(key)) {
this.values[key] = Array(this.length)
} else if (this.values[key].length < this.length) {
this.values[key][this.length-1] = undefined
}

this.values[key].push(roundTo(value, 4))
Expand Down

Large diffs are not rendered by default.

33 changes: 18 additions & 15 deletions assets/ui/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./xk6-dashboard.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module" src="./boot.js"></script>
<script type="module" src="./init.js"></script>
<title>k6 dashboard</title>
<script type="module" crossorigin src="./assets/index-aa15e9e4.js"></script>
<link rel="stylesheet" href="./assets/index-fd5c5824.css">
</head>
<body>
<div id="root"></div>

</body>
</html>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./xk6-dashboard.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module" src="./boot.js"></script>
<script type="module" src="./init.js"></script>
<title>k6 dashboard</title>
<script type="module" crossorigin src="./assets/index-ec9aa95e.js"></script>
<link rel="stylesheet" href="./assets/index-fd5c5824.css">
</head>

<body>
<div id="root"></div>

</body>

</html>

0 comments on commit ecf801f

Please sign in to comment.