Git Product home page Git Product logo

dataprocessingbenchmark's Introduction

DataProcessingBenchmark

DataProcessingBenchmark is a .NET console application that compares the processing speed between Redis and SQL Server. The application creates a table, fills it with a specified number of rows, processes them, and measures the performance in terms of rows processed per second and elapsed time.

Table of Contents

Prerequisites

  • .NET SDK 6.0 or later
  • Redis server (if testing with Redis)
  • SQL Server (if testing with SQL Server)

Installation

  1. Clone the repository or download the source code.
  2. Navigate to the project directory.
cd DataProcessingBenchmark

### Add the necessary packages.

dotnet add package StackExchange.Redis
dotnet add package Microsoft.Data.SqlClient
dotnet add package CommandLineParser

### Build the project

dotnet build

Usage

Run the application with the appropriate command-line arguments to test the performance of Redis or SQL Server.

dotnet run -- [options]

Options

  • -d, --dataSource (required): Specify the data source: Redis or SqlServer.
  • -c, --connection (required): Connection string for the data source.
  • -b, --batchSize (default: 1000): Number of rows written at once.
  • -t, --threads (default: 4): Number of parallel threads.
  • -r, --rows (default: 10000): Total number of rows to be processed.

Examples

SQL Server

dotnet run -- -d SqlServer -c "Server=your_server;Database=your_db;User Id=your_user;Password=your_password;TrustServerCertificate=True" -b 1000 -t 4 -r 10000

Replace your_server, your_db, your_user, and your_password with the appropriate values for your SQL Server instance.

How to launch a DOcker image to test :

sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>" \
   -p 1433:1433 --name sql1 --hostname sql1 \
   -d \
   mcr.microsoft.com/mssql/server:2022-latest

dotnet run -- -d SqlServer -c "Server=localhost;Database=TestDB;User Id=SA;Password=YourStrong@Passw0rd;" -b 1000 -t 4 -r 10000

Redis

dotnet run -- -d Redis -c "localhost" -b 1000 -t 4 -r 10000

How to launch a DOcker image to test :

docker run -p 6379:6379 --name redis -d redis:latest

License

This project is licensed under the MIT License. See the LICENSE file for details.

Feel free to customize the README further based on your specific needs and preferences.

dataprocessingbenchmark's People

Contributors

sleroy avatar

Watchers

 avatar

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.