Skip to content

Instantly share code, notes, and snippets.

@guilsa
Last active February 17, 2026 00:35
Show Gist options
  • Select an option

  • Save guilsa/3b697786eaa46c41c578604c333e5f3c to your computer and use it in GitHub Desktop.

Select an option

Save guilsa/3b697786eaa46c41c578604c333e5f3c to your computer and use it in GitHub Desktop.
Time Based Chart of Vercel Deploy Times on Google Sheets
function parseTime(str) {
if (!str) return null;
const m = str.match(/(?:(\d+)m\s*)?(\d+)s/);
if (!m) return null;
return (parseInt(m[1] || 0) * 60) + parseInt(m[2]);
}
const results = Array.from(document.querySelectorAll('[data-testid="deployment/status"]')).map(statusEl => {
const field = statusEl.parentElement?.parentElement?.parentElement;
const row = field?.parentElement;
const status = statusEl.querySelector('.text-label-14')?.textContent?.trim();
const time = field?.querySelector('.tabular-nums')?.textContent?.trim();
const name = row?.querySelector('[data-testid="deployment-entity/target"] p')?.textContent?.trim();
return { name, status, time, seconds: parseTime(time) };
}).filter(r => r.status === 'Ready');
// Copy as CSV (newest deployments are first, reverse for chronological order)
const csv = ['Deployment,Build Time (s)']
.concat(results.reverse().map(r => `${r.name},${r.seconds}`))
.join('\n');
copy(csv);
console.log('Copied to clipboard!\n' + csv);
@guilsa
Copy link
Author

guilsa commented Feb 17, 2026

Then in Google Sheets:

  1. Click an empty cell (e.g. A1)
  2. Cmd+V to paste — it'll auto-split into two columns
  3. Select both columns → Insert → Chart
  4. Chart type: Line chart
  5. Google Sheets will use Deployment as the X-axis labels and Build Time (s) as the Y values

The script reverses the array so the graph goes oldest → newest (left to right). If you prefer minutes instead of seconds, change seconds: parseTime(time) to seconds: +(parseTime(time) / 60).toFixed(2) and update the CSV header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment