import { Server } from "https://deno.land/x/denosoar@v1.0.0/communication/server.ts";
A server that can be spun up inside any process and will mine and transmit memory data via a Websocket connection. The server contains simple endpoints that allow the user to interact with the way data is being mined/transmitted.
Properties
private
app: Applicationprivate
controller: AbortControllerprivate
encoder: TextEncoderprivate
router: Routerprivate
setWS: (ws: WebSocket) => unknownsetWS and deleteWS allow for mutable Websocket connections. The user can freely disconnect and reconnect via the GUI.
private
ws: WebSocket | nullGenerate data in an OS dependent form, record/send the data if requested. Deno's memoryUsage() function generates an incorrect value for rss, so this is calculated via the terminal.
date: Date
record: (mem: RealMemory) => unknown
Writes the memory data to a csv file for as long as requested. CSV files can be processed on the GUI.