### Run Benchmark with Default Settings Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/README.md This command executes the `test.sh` script using its default configuration, which typically involves 3 runs and 100 requests per service per run. It's the simplest way to start a benchmark without custom parameters. ```bash ./test.sh ``` -------------------------------- ### Install Bun Project Dependencies Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/buntal/README.md This command uses the Bun package manager to install all required dependencies for the project. It's typically the first step after cloning a repository. ```bash bun install ``` -------------------------------- ### Display Benchmark Script Help Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/README.md This command shows the help message for the `test.sh` script, providing information on available options and usage. It's useful for understanding all configurable parameters and command-line arguments. ```bash ./test.sh --help ``` -------------------------------- ### Create a Simple Buntal API Endpoint Source: https://github.com/mgilangjanuar/buntal/blob/main/examples/blog/app/blog/[[...slug]]/example-post.mdx This TypeScript example illustrates how to define a basic API endpoint in Buntal. It imports the `Req` type from `@buntal/http` and exports an asynchronous function that takes a request object and returns a simple JSON response, demonstrating a 'Hello World' API. ```typescript import { Req } from '@buntal/http' export const $ = async (req: Req) => { return { message: 'Hello from Buntal!' } } ``` -------------------------------- ### Run Bun Project Index File Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/buntal/README.md This command executes the main TypeScript file (index.ts) of the Bun project. It starts the application as defined in the project's entry point. ```bash bun run index.ts ``` -------------------------------- ### Integrate MDX Content with Buntal using Bun Macros Source: https://github.com/mgilangjanuar/buntal/blob/main/examples/blog/app/blog/[[...slug]]/example-post.mdx This TypeScript snippet demonstrates how to integrate MDX content into a Buntal application using Bun's macro system. It shows importing an `mdx` macro from a local file to load MDX content at compile time, which helps improve application performance. ```typescript import { mdx } from './render.tsx' with { type: 'macro' } const Post = mdx('./example-post.mdx') ``` -------------------------------- ### Create a New Buntal JS Project Source: https://github.com/mgilangjanuar/buntal/blob/main/packages/buntal/README.md This command initializes a new Buntal JS project using the Bun runtime. It sets up the basic project structure and dependencies, allowing developers to quickly start building applications. ```bash bun create buntal my-app ``` -------------------------------- ### Install Python Dependencies for FastAPI Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/py-fastapi/README.md Instructions to install the required Python packages, FastAPI and Uvicorn, using pip. These libraries are essential for running the web application. ```sh pip install fastapi uvicorn ``` -------------------------------- ### Initialize New Buntal Project Source: https://github.com/mgilangjanuar/buntal/blob/main/README.md This command initializes a new Buntal JS project using the `bun create` command-line tool. It sets up the basic project structure and dependencies, allowing developers to quickly start building a new Buntal application. ```bash bun create buntal@latest my-app ``` -------------------------------- ### FastAPI JSON Endpoint Reference Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/py-fastapi/README.md API documentation for the `/json` endpoint. This GET request returns a simple JSON object containing a 'Hello, World!' message. ```APIDOC GET /json Description: Returns a simple JSON message. Response: Content-Type: application/json Body: { "message": "Hello, World!" } ``` -------------------------------- ### Create New Buntal Project Source: https://github.com/mgilangjanuar/buntal/blob/main/packages/create-buntal/README.md Initializes a new Buntal application using the `bun create` command. This command sets up the basic project structure and dependencies, allowing developers to quickly start building a new Buntal project. ```bash bun create buntal my-app ``` -------------------------------- ### Initialize New Buntal JS Project Source: https://github.com/mgilangjanuar/buntal/blob/main/packages/@buntal/cli/README.md This command uses the Bun runtime to scaffold a new Buntal JS application. It sets up the initial project structure and necessary dependencies, allowing developers to quickly start building. ```bash bun create buntal my-app ``` -------------------------------- ### Quick Benchmark for Development Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/README.md This command is recommended for development purposes, allowing for quick feedback by running the benchmark with a minimal number of runs and requests. It significantly reduces execution time for iterative testing cycles. ```bash ./test.sh --runs 1 --requests 10 ``` -------------------------------- ### Run FastAPI Development Server Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/py-fastapi/README.md Command to start the FastAPI application using Uvicorn. The `--reload` flag enables automatic server restarts on code changes, which is useful for development. ```sh uvicorn main:app --reload ``` -------------------------------- ### Configure Benchmark Runs and Requests Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/README.md These commands demonstrate how to customize the benchmark execution by specifying the number of runs and requests per service. This allows for more extensive testing or quick, minimal checks tailored to specific needs. ```bash ./test.sh --runs 5 --requests 50 ``` ```bash ./test.sh --runs 2 --requests 10 ``` -------------------------------- ### Production-Grade Benchmark for Statistical Significance Source: https://github.com/mgilangjanuar/buntal/blob/main/benchmark/README.md For production-level benchmarking, this command increases the number of runs and requests to ensure statistical significance. This provides more reliable and robust performance data suitable for critical analysis. ```bash ./test.sh --runs 10 --requests 1000 ``` -------------------------------- ### Create New Buntal JS Project Source: https://github.com/mgilangjanuar/buntal/blob/main/packages/@buntal/http/README.md Initializes a new Buntal JS application using the Bun package manager. This command sets up the basic project structure for a new web application. ```bash bun create buntal my-app ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.