Giter Site home page Giter Site logo

simulator's Introduction

Overview

This is a simulator to run of a live editing scenarios for various loads of concurrent live editing documents where each document can have a randomly generatated number of concurrent live editing users and each user engages in a live editing session with different characteristics. Each user can engage in an editing session of a document with a randomly generated duration, and within the engagement duration the writing of delta changes pattern varies depend on the user is a power, regular, or casual users.

The delta change a user writes to a document is simulated with writing a record to stdout. The record format is designed to be easily imported to a time series database for query and dashboarding purpose. For example, we can observe given a simulation load pattern, how many concurrent documents are under active editing for a given interval (second, minute, hour) so that we can infer into the capacity model of upstream services.

This simulator can simulate work load of many thousands of concurrent documents per second where each document editing session can have up to 100 concurrent users.

installation and configuration

This simulator requires python3. Preferaby 3.9 and up.

setup

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

configuration

edit config.json. Hopefully the properties are self explanatory enough.

run

  • Collect the events in an output file for easy import to time series database for analysis.
  • simulation summary is written to summary.log
python simulation.py > output.log

simulator's People

Contributors

tommyli123 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.