@d1testflare/analytics-engine
v2.9.0
Published
Workers Analytics Engine module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers
Downloads
78
Maintainers
Readme
@d1testflare/analytics-engine
Workers Analytics Engine module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers. See 📈 Analytics Engine for more details.
Example
import { AnalyticsEngine } from "@d1testflare/analytics-engine";
import { createSQLiteDB } from "@d1testflare/shared";
const db = new AnalyticsEngine("DATASET_NAME", await createSQLiteDB(":memory:"));
await db.writeDataPoint({
indexes: ["a3cd45"], // Sensor ID
blobs: ["Seattle", "USA", "pro_sensor_9000"], // City, Country, Sensor
doubles: [25, 0.5], // Temperature, Humidity
});