ProtoDoDBench
A modern web application for benchmarking and comparing performance between Protocol Buffers (protobuf) and Data-Oriented Design (DOD) implementations. Built with React, TypeScript, and Vite.
Features
- Real-time performance benchmarking between protobuf and DOD implementations
- Interactive data visualization using AG Grid Enterprise
- Historical performance tracking with p99 metrics
- Dark/Light theme support
- Auto-run capability for continuous benchmarking
- Comprehensive performance metrics including:
- Minimum execution time
- Maximum execution time
- Mean execution time
- Median (p50) execution time
- p99 execution time
- Total execution time
Screenshots
Main Dashboard
TODO
Benchmark Scenarios
The application will be extended to compare the following scenarios:
-
Large Number Fields Model
- 100 numeric fields (integers, floats, doubles)
- Comparison of serialization/deserialization performance
- Memory usage analysis
-
Large String Fields Model
- 100 string fields
- Various string lengths and patterns
- UTF-8 encoding performance
-
Nested Fields Model
- Complex nested structures
- Multiple levels of nesting
- Array fields within nested objects
- Performance impact of different nesting depths
Future Enhancements
- Add support for different protobuf field types
- Implement memory usage tracking
- Add export functionality for benchmark results
- Support for custom benchmark scenarios
- Real-time performance graphs
- Comparison with other serialization formats
Tech Stack
- React 19
- TypeScript
- Vite
- AG Grid Enterprise
- Protocol Buffers (protobufjs)
- PBF (Protocol Buffer Format)
- Bun (JavaScript runtime & package manager)
- Modern development tools (ESLint, Prettier, Husky)
Getting Started
Prerequisites
- Bun (latest version recommended)
- Node.js (latest LTS version recommended) - for development tools
Installation
- Clone the repository:
git clone https://github.com/yourusername/protododbench.git
cd protododbench- Install dependencies:
bun install- Generate Protocol Buffer files:
bun run generate:proto- Start the development server:
bun run devAvailable Scripts
bun run dev- Start development serverbun run build- Build for productionbun run preview- Preview production buildbun run generate:proto- Generate Protocol Buffer filesbun run lint- Run ESLintbun run format- Format code with Prettier
Project Structure
src/
├── components/ # React components
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── MyModel.proto # Protocol Buffer definition
└── App.tsx # Main application component
Benchmarking Model
The benchmark compares two approaches for handling the following data structure:
message MyModel {
fixed32 id = 1;
double value = 2;
}- Protocol Buffers: Using protobufjs for serialization/deserialization
- Data-Oriented Design: Using a custom implementation optimized for performance
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
On this page
Contributors
MIT License
Created March 29, 2025
Updated March 31, 2025
