Skip to content

Commit

Permalink
Initial update for zlib-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Dec 17, 2024
1 parent ed9068d commit 0aa8e2d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## rust-analyzer dashboard
## zlib-rs performance dashboard

Stores performance metrics for rust-analyzer.
Stores performance metrics for zlib-rs.

Metrics are automatically published by GitHub Actions.

Expand All @@ -22,4 +22,4 @@ npm run build

## License

Dual-licensed under [Apache 2.0](LICENSE-APACHE) and [MIT license](LICENSE-MIT).
Dual-licensed under [Apache 2.0](LICENSE-APACHE) and [MIT license](LICENSE-MIT).
7 changes: 3 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rust-analyzer Dashboard</title>
<title>zlib-rs benchmark dashboard</title>
<script src="https://cdn.plot.ly/plotly-1.58.4.min.js"></script>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<div id="inner">
<h1>rust-analyzer dashboard</h1>
<h1>zlib-rs benchmark dashboard</h1>

<p>
<a href="..">Home</a> &nbsp;
<a href="https://github.com/rust-analyzer/metrics/tree/gh-pages">GitHub</a>
<a href="https://github.com/trifectatechfoundation/zlib-rs-bench/tree/gh-pages">GitHub</a>
</p>

<details>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metrics",
"description": "Stores performance metrics for rust-analyzer.",
"description": "Stores performance metrics for zlib-rs.",
"version": "1.0.0",
"devDependencies": {
"typescript": "^4.5.2",
Expand All @@ -12,9 +12,9 @@
},
"license": "MIT OR Apache-2.0",
"bugs": {
"url": "https://github.com/rust-analyzer/metrics/issues"
"url": "https://github.com/trifectatechfoundation/zlib-rs-bench/issues"
},
"homepage": "https://github.com/rust-analyzer/metrics#readme",
"homepage": "https://github.com/trifectatechfoundation/zlib-rs-bench/tree/gh-pages#readme",
"prettier": {
"trailingComma": "es5",
"tabWidth": 4,
Expand Down
5 changes: 3 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function show_notification(html_text) {
}, 3000);
}
async function main() {
const DATA_URL = 'https://raw.githubusercontent.com/rust-analyzer/metrics/master/metrics.json';
const DATA_URL = 'https://raw.githubusercontent.com/trifectatechfoundation/zlib-rs-bench/main/metrics.json';
const data = await (await fetch(DATA_URL)).text();
const entries = data
.split('\n')
Expand Down Expand Up @@ -145,6 +145,7 @@ async function main() {
y: data,
hovertext: revision,
hovertemplate: `%{y} ${unit}<br>(%{hovertext})`,
// These are no longer tracked, so hide them by default
visible: !(project === 'ripgrep' ||
project === 'diesel' ||
project === 'webrender'),
Expand All @@ -169,7 +170,7 @@ async function main() {
Plotly.newPlot(plotDiv, definition.data, definition.layout);
plotDiv.on('plotly_click', (data) => {
const commit_hash = data.points[0].hovertext;
const url = `https://github.com/rust-analyzer/rust-analyzer/commit/${commit_hash}`;
const url = `https://github.com/trifectatechfoundation/zlib-rs/commit/${commit_hash}`;
const notification_text = `Commit <b>${commit_hash}</b> URL copied to clipboard`;
navigator.clipboard.writeText(url);
show_notification(notification_text);
Expand Down
4 changes: 2 additions & 2 deletions script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function show_notification(html_text: string) {

async function main() {
const DATA_URL =
'https://raw.githubusercontent.com/rust-analyzer/metrics/master/metrics.json';
'https://raw.githubusercontent.com/trifectatechfoundation/zlib-rs-bench/main/metrics.json';
const data = await (await fetch(DATA_URL)).text();
const entries: Entry[] = data
.split('\n')
Expand Down Expand Up @@ -236,7 +236,7 @@ async function main() {
Plotly.newPlot(plotDiv, definition.data, definition.layout);
plotDiv.on('plotly_click', (data) => {
const commit_hash: string = (data.points[0] as any).hovertext;
const url = `https://github.com/rust-analyzer/rust-analyzer/commit/${commit_hash}`;
const url = `https://github.com/trifectatechfoundation/zlib-rs/commit/${commit_hash}`;
const notification_text = `Commit <b>${commit_hash}</b> URL copied to clipboard`;
navigator.clipboard.writeText(url);
show_notification(notification_text);
Expand Down

0 comments on commit 0aa8e2d

Please sign in to comment.