🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

codealytics

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

codealytics

1.0.0-b6
NuGet
Version published
Maintainers
0
Created
Source

Codealytics

Codelytics is a nuget package for performance analytics, hardware-monitoring and statistics. It also provides a function to handle the console, and display all metrics.

Examples

Add Metric

analytics.AddMetric<string>("myString", "hello World!");
analytics.AddMetric<bool>("IsWorking", () => { return true; }, true) //Not displayed or shown using toString, hidden.

Update Metric

analytics.UpdateMetric<string>("myString", "Hi");

HandleUi

Set the bool HandleUi to let the library take control over the console.

analytics.HandleUi = false;

Check if a Metric exists

analytics.MetricExists("myString"); //true or false

ToString

Returns a string build with Prefix and Suffix that contians all values that should be displayed.

analytics.toString();

Hardware-Monitoring

analytics.AddMetric<string>("CPU", () => { return Math.Round(HardwareMonitor.Instance.CPU).ToString() + "%"; });
analytics.AddMetric<string>("RAM", () => { return Math.Round(HardwareMonitor.Instance.RAM).ToString() + "%"; });

Code Runtime Performance

analytics.AddMetric<IRuntimePerformanceInfromation>("G_Train_Performance", new RuntimePerformanceInfromation());
analytics.CodeRuntimePerformance("G_Train_Performance", () =>
{
    (costEval, accEval) = model.TrainOnBatch(inputs.ToArray(), outputs.ToArray());
});
string id = analytics.CodeRuntimePerformance(() =>
{
    (costEval, accEval) = model.TrainOnBatch(inputs.ToArray(), outputs.ToArray());
});

Keywords

analytics

FAQs

Package last updated on 03 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts