Giter Club home page Giter Club logo

scourge's Introduction

Scourge - The punisher of your .net core web app or app

What can Scourge do and what the h... is this insanity.

I needed to inflict โ—๐Ÿ’ฅ on .net stuff running in containers, and this helped me channel all my :rage4:

Warning This is still work in progress, and no nuget packages published...yet, that said it's as simple as cloning and run this sample src/Contallocator

General stuff

  • Inflict pain ๐Ÿ‘Š in both web and standard .net core applications, with special support for aspnet core.
  • Allocate chunks of both managed and unmanaged memory.
  • Throws hard to handle exceptions like stackoverflow exception and exceptions thrown in async.methods returning void
  • Throw whatever exception you demand. (as long as it supports a .ctor(string message)
  • Get Garbage Collector information and force collects.
  • Get Machine simple information, total memory as seen by the app, number of processors, all configured settings and environment variables.
  • ThreadWhipper โ„ข ๐Ÿ˜‰ start X threads to consume 100% cpu on all or some of the processors. available to the application (useful in the winter when you need electric heating)
  • Process information - information about the current process, environment variables, configuration, memory etc.
  • Process list - list runing processes including various details.

Coming soon

  • Starve the thread pool.

See the Considering section for more possible fun.

Aspnet core specific stuff

  • All the nastiness from General Stuff exposed as rest endpoints.
  • Open api. (swagger) for all the endpoints.
  • Easy injection into your aspnet core app.
  • Send log messages with different log levels.

Coming soon to Scourge for aspnet core

Examples

Enable Scourge in your aspnet core app.

  1. Add a reference to the Scourge.AspNetCore nuget package // TODO: add nuget url
  2. Use Scourge in your app, see the simple example below. or the "full" sample/test application

Warning In the example below and in the "full" example there is NO AUTHENTICATION enabled, so don't do this in production.

var builder = WebApplication.CreateBuilder(args);

// If you want swagger for the Scourge endpoints (Not needed if you know the endpoints :D)
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

// Add Scourge Services
builder.Services.AddScourge();

var app = builder.Build();

// Map scourge
app.MapScourge("/scourge");


// If you want swagger (Not needed if you know the endpoints :D)
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}

app.Run();

Considering

  • CLI for Scourge
  • UI for Scourge
  • Socket leaking
  • Random tasker background service that will consume memory and cpu cycles at random.
  • Random failures from the middleware (must make sure this middleware is one of the first, investigate if it's also possible via starup hooks)
  • Feel free to add ideas (play nice, start the title with [IDEA])
  • Contribute your own hurtful ideas Contributing To Scourge

Contributing to Scurge

You're more than welcome to contibute to Scurge, the process is simple.

  1. Come to terms with the fact that Scourge is .net 7 and above only.
  2. Decide if you want to contribute ๐Ÿ‘Šhurt, information, ui or just nice helpers
  3. Fork Scurge
  4. Add your stuff
  5. Submit a pull request.

Scource meaning according to www.merriam-webster.com

WHIP especially : one used to inflict pain or punishment.
An instrument of punishment or criticism.
Cause of wide or great affliction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.