Public
Edited
Nov 9, 2023
Insert cell
Insert cell
poll = FileAttachment("poll.log").csv({ typed: true })
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(poll, { x: "Date", y: (d) => d["FirstByteMs"] + d["TransferMs"] })
]
})
Insert cell
primaryswitch = FileAttachment("poll.log.primaryswitch.csv").csv({
typed: true
})
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(primaryswitch, {
x: "Date",
y: (d) => d["FirstByteMs"] + d["TransferMs"]
})
]
})
Insert cell
killva = FileAttachment("poll.log.3").csv({
typed: true
})
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(killva, {
x: "Date",
y: (d) => d["FirstByteMs"] + d["TransferMs"]
})
]
})
Insert cell
staging1 = FileAttachment("transition_contd_2.csv").csv({
typed: true
})
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(staging1, {
x: "Date",
y: (d) => d["FirstByteMs"] + d["TransferMs"]
})
]
})
Insert cell
switchleader = FileAttachment("switchleader.csv").csv({
typed: true
})
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(switchleader, {
x: "Date",
y: (d) => d["FirstByteMs"] + d["TransferMs"]
})
]
})
Insert cell
dropca = FileAttachment("dropca.csv").csv({
typed: true
})
Insert cell
Plot.plot({
inset: 8,
grid: true,
color: {
legend: true
},
marks: [
Plot.line(dropca, {
x: "Date",
y: (d) => d["FirstByteMs"] + d["TransferMs"]
})
]
})
Insert cell
// the script used to generate the data follows:
{
// Output columns:
// - date/time that request was fired
// - HTTP status code
// - time to first byte (milliseconds)
// - time from first byte to last byte
//
// URL points to the ReadMe docs' "Best Practices" page
// readmebackup.com uses MongoDB Atlas database readme-support
const URL = '<censored>/main/docs/best-practices';
const AUTH_VALUE = '<censored>';
async function pollOnce() {
const currentTs = Date.now();
const currentMs = currentTs - Math.floor(currentTs / 1000) * 1000;
const sleepMs = 1000 - currentMs;
setTimeout(pollOnce, sleepMs);
const t0 = Date.now();
const d = new Date();
const resp = await fetch(URL, { headers: { Authorization: AUTH_VALUE }, redirect: 'manual' });
const t1 = Date.now();
await resp.text();
const t2 = Date.now();
const output = [d.toISOString(), resp.status, t1 - t0, t2 - t1];
console.log(output.join(','));
}
console.log('Date,Status,FirstByteMs,TransferMs');
pollOnce();
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more