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
setWS and deleteWS allow for mutable Websocket connections. The user can freely disconnect and reconnect via the GUI.
Generate 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.
Writes the memory data to a csv file for as long as requested. CSV files can be processed on the GUI.
Spins up the server and allows the user to interact with the server via simple endpoints.
stopRecord and startRecord allow the user to sample data at different times. New files will be created with the current date each time startRecord is called. Files are created in the repo where the server is initialized.