A prisma query-engine concurrency runner

Related tags

Miscellaneous smash
Overview

Smash

A prisma query-engine concurrency runner. Smash can be used to run concurrent requests against the prisma query engine. Currently it has workloads designed to test the interactive transactions in the query engine.

Options

Smash - A query engine concurrent simulator

USAGE:
    smash [OPTIONS]

OPTIONS:
    -c, --concurrency 
   
        [default: 10]
    -h, --help                         Print help information
    -i, --iterations 
    
           Number of times to run it [default: 1]
    -n, --name 
     
                        [default: simple]
    -t, --timeout 
      
                   Timeout in milliseconds for a transaction [default: 1000]
    -V, --version                      Print version information
    -w, --wait 
       
         Wait time for a connection in milliseconds [default: 5000] 
       
      
     
    
   

A basic run would be:

smash -c 10 -n simple -i 3 -t 1000 -w 5000

That would run the simple workload with 10 concurrent connections and it will do that 3 times. A transaction will timeout after 1s and will wait 5s to get a database connection.

Workloads

At the moment there are two workloads:

  • simple - A simple decrement update and batch update that will commit
  • mixed - A workload that will rollback half of the operations and some just leave to timeout

Usage

Copy the below schema into dev_datamodel.prisma in the prisma-engines repo.

datasource db {
  provider = "postgres"
  url      = "postgresql://postgres:prisma@localhost:5434"
}

generator js {
  provider        = "prisma-client-js"
  previewFeatures = ["fullTextSearch", "fullTextIndex", "interactiveTransactions"]
}

model Account {
  id      Int    @id @default(autoincrement())
  email   String @unique
  balance Int
}

run:

$ make push-schema && make qe

Then run Smash.

You might also like...
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Concurrency extensions for Future

futures-concurrency Concurrency extensions for Future API Docs | Releases | Contributing Installation $ cargo add futures-concurrency Contributing Wan

Loom is a concurrency permutation testing tool for Rust.

Loom is a testing tool for concurrent Rust code

A concurrency framework for building real-time systems

Real-Time Interrupt-driven Concurrency A concurrency framework for building real-time systems. Formerly known as Real-Time For the Masses. Features Ta

Traverse DMMF of Prisma schema, in your terminal

Let's DMMF Traverse DMMF of Prisma schema, in your terminal. Powered by jless. Installation brew tap yujong-lee/tap brew install letsdmmf Usage # lets

A template for creating services in Rust using Axum and Prisma.

A template for creating services in Rust using Axum and Prisma. This uses the super cool Prisma Rust Client.

High concurrency, RealTime, In-memory storage inspired by erlang mnesia
High concurrency, RealTime, In-memory storage inspired by erlang mnesia

DarkBird is a Document oriented, high concurrency in-memory Storage, also persist data to disk to avoid loss any data The darkbird provides the follow

Rust Concurrency Cheat Sheet

Rust ensures data race safety through the type system (Send and Sync marker traits) as well as the ownership and borrowing rules: it is not allowed to alias a mutable reference, so it is not possible to perform a data race.

Optimistic multi-version concurrency control (MVCC) for main memory databases, written in Rust.

MVCC for Rust This is a work-in-progress the Hekaton optimistic multiversion concurrency control library in Rust. The aim of the project is to provide

Leptos Axum Prisma starter with Admin dashboard and SSR/SPA website
Leptos Axum Prisma starter with Admin dashboard and SSR/SPA website

LAPA - Leptos Axum Prisma starter with Admin dashboard and SSR/SPA website Motivation I want to have practical full-stack setup to build websites and

Rust/Axum server implementation with PCR(Prisma Client Rust)
Rust/Axum server implementation with PCR(Prisma Client Rust)

Realworld Rust Axum Prisma This project utilizes Rust with the Axum v0.7 framework along with the Prisma Client Rust to build a realworld application.

2d Endless Runner Game made with Bevy Game Engine
2d Endless Runner Game made with Bevy Game Engine

Cute-runner A 2d Endless Runner Game made with Bevy Game Engine. Table of contents Project Infos Usage Screenshots Disclaimer Project Infos Date: Sept

A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.
A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.

Mini Google Course project for the Architecture of Computer Systems course. Overview: Architecture: We are working on multiple components of the web c

A Toy Query Engine & SQL interface
A Toy Query Engine & SQL interface

Naive Query Engine (Toy for Learning) 😄 This is a Query Engine which support SQL interface. And it is only a Toy for learn query engine only. You can

Blazing fast Rust JSONPath query engine.

rsonpath – SIMD-powered JSONPath 🚀 Experimental JSONPath engine for querying massive streamed datasets. Features The rsonpath crate provides a JSONPa

🤖 Just a command runner

just just is a handy way to save and run project-specific commands. (非官方中文文档,这里,快看过来!) Commands, called recipes, are stored in a file called justfile

🎭 A CLI task runner defined by a simple markdown file
🎭 A CLI task runner defined by a simple markdown file

mask is a CLI task runner which is defined by a simple markdown file. It searches for a maskfile.md in the current directory which it then parses for

Text Expression Runner – Readable and easy to use text expressions
Text Expression Runner – Readable and easy to use text expressions

ter - Text Expression Runner ter is a cli to run text expressions and perform basic text operations such as filtering, ignoring and replacing on the c

comfy is a flexible command script manager / runner written in Rust

comfy is a cross-platform command script manager / runner tool, which allows you to run commands in the command line itself, but being these predefined in a portable and universal .comfy file.

Owner
garren smith
@redcometlabs Founder. Apache @CouchDB PMC, @pouchdb. Javascript developer
garren smith
Pipelined Relational Query Language, pronounced "Prequel"

PRQL Pipelined Relational Query Language, pronounced "Prequel". PRQL is a modern language for transforming data — a simpler and more powerful SQL. Lik

Maximilian Roos 2 Dec 30, 2022
MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine

MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine. Both searching and indexing are highly customizable. Features such as typo-tolerance, filters, and synonyms are provided out-of-the-box. For more information about features go to our documentation.

MeiliSearch 31.6k Dec 30, 2022
A collection of exponentially-smoothed camera controllers for the Bevy Engine.

smooth-bevy-cameras A collection of exponentially-smoothed camera controllers for the Bevy Engine. Look Transform All controllers are based on a LookT

Duncan 122 Dec 24, 2022
A simple induction and BMC engine.

Mikino is a (relatively) simple induction and BMC engine. Its goal is to serve as a simple yet interesting tool for those interested in formal verification, especially SMT-based induction.

OCamlPro 21 Oct 8, 2022
A scalable differentiable probabilistic Datalog engine, with Rust

Scallop A scalable probabilistic datalog engine with Rust. Usage The Scallop system is best integrated inside of the Rust context. With scallop! { ...

null 74 Oct 24, 2022
Blueboat is an open-source alternative to Cloudflare Workers. The monolithic engine for serverless web apps.

Blueboat Blueboat is an open-source alternative to Cloudflare Workers. Blueboat aims to be a developer-friendly, multi-tenant platform for serverless

Heyang Zhou 1.8k Jan 9, 2023
This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

kaiuri 1 Feb 11, 2022
Toy: Layout-Engine

Toy: Layout-Engine

Oanakiaja 5 Mar 29, 2022
Safe API to embed an ECMAScript engine.

Kopi Kopi is a small abstraction to easily and safely embed an ECMAScript runtime inside a Rust based application. It uses the V8 execution engine to

Nils Hasenbanck 3 Dec 20, 2022
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Prisma ORM for community 10 Dec 15, 2022