Unlisted
Edited
Nov 27
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
log = (...args) => {
console.log(...args);
const line = args.join(" ");
const match = /(\S+) (\d+)ms (\S+)/.exec(line);
logs.push(line);
if (match) {
const [_, label, millis, operation] = match;
viewof latency_measurements.value.push({
client: label.replace("-s", "").replace("-w", ""),
latency: Number.parseInt(millis),
operation:
operation.startsWith("PUT") || operation == "CLEANUP"
? "PUT"
: operation === "SWEEP" ||
operation === "POLL_TIME" ||
operation == "LOOK_BACK" ||
operation == "GET_CONTENT" ||
operation == "GET_LATEST"
? "GET"
: operation
});
viewof latency_measurements.dispatchEvent(new Event("input"));
}
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
backblaze_config = runBackblaze && {
defaultBucket: "mps3-demo",
label: "bckblz",
useChecksum: false,
useVersioning: true,
s3Config: {
endpoint: "https://s3.us-east-005.backblazeb2.com",
region: "us-east-005",
// Configured here: https://secure.backblaze.com/app_keys.htm?bznetid=17927252851691330596178
// This auto deletes everything after one day
credentials: {
accessKeyId: "0056a0e8e0f4cf20000000004",
secretAccessKey: "K005trGQCO0zYv+SVpYJhRtW0O399B0"
}
}
}
Insert cell
Insert cell
Insert cell
latency_backblaze
Insert cell
viewof latency_backblaze = Inputs.button("latency", {
reduce: () => {
const t_start = Date.now();
backblaze.put("latency", t_start).then(() => backblaze2.refresh());
return new Promise((resolve) => {
const unsubscribe = backblaze2.subscribe("latency", (val) => {
if (val === t_start) {
unsubscribe();
resolve(Date.now() - t_start);
}
});
});
}
})
Insert cell
Generators.observe((notify) => {
invalidation.then(backblaze2.subscribe("latency", notify));
})
Insert cell
backblaze2.get("latency")
Insert cell
backblaze.put("latency", "cool")
Insert cell
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