{"id":25890484,"url":"https://github.com/laiba-iqrar/performance-benchmark-tool","last_synced_at":"2026-05-09T21:37:35.164Z","repository":{"id":277762326,"uuid":"933409540","full_name":"Laiba-Iqrar/Performance-Benchmark-Tool","owner":"Laiba-Iqrar","description":"Perl script to benchmark system performance, including CPU, Disk I/O, Memory, and Network metrics. Designed for system administrators, developers.Helps manage system performance and identify bottlenecks","archived":false,"fork":false,"pushed_at":"2025-03-02T12:55:52.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T13:37:16.316Z","etag":null,"topics":["linux-kernel","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Laiba-Iqrar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-15T22:03:39.000Z","updated_at":"2025-03-02T12:55:55.000Z","dependencies_parsed_at":"2025-02-15T23:26:26.348Z","dependency_job_id":"f24598f8-2ed6-403c-a04e-ae963a1f3822","html_url":"https://github.com/Laiba-Iqrar/Performance-Benchmark-Tool","commit_stats":null,"previous_names":["laiba-iqrar/performance-benchmark-tool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laiba-Iqrar%2FPerformance-Benchmark-Tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laiba-Iqrar%2FPerformance-Benchmark-Tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laiba-Iqrar%2FPerformance-Benchmark-Tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laiba-Iqrar%2FPerformance-Benchmark-Tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Laiba-Iqrar","download_url":"https://codeload.github.com/Laiba-Iqrar/Performance-Benchmark-Tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241557738,"owners_count":19981961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux-kernel","perl"],"created_at":"2025-03-02T19:19:59.093Z","updated_at":"2025-11-28T21:01:50.612Z","avatar_url":"https://github.com/Laiba-Iqrar.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Performance-Benchmark-Tool\nPerl script to benchmark system performance, including CPU, Disk I/O, Memory, and Network metrics. Designed for system administrators, developers.Helps manage system performance and identify bottlenecks\n\n\n## **Features**\n\n- **CPU Benchmark**: Measures CPU performance using `sysbench`.\n- **Disk I/O Benchmark**: Tests disk read/write speeds using `dd`.\n- **Memory Benchmark**: Evaluates memory performance using `sysbench`.\n- **Network Benchmark**: Tests network throughput using `iperf`.\n- **Application Benchmark**: Measures application performance using `ab` (Apache Benchmark).\n\n---\n\n## **Requirements**\n\n- **Perl 5.x**\n- **sysbench**: For CPU and memory benchmarks.\n- **iperf**: For network benchmarking (optional).\n- **ab (Apache Benchmark)**: For application benchmarking (optional).\n\n---\n\n\n **Install Dependencies**:\n   - On **Debian/Ubuntu**:\n     ```bash\n     sudo apt update\n     sudo apt install perl sysbench iperf apache2-utils\n     ```\n **Make the Script Executable**:\n   ```bash\n   chmod +x benchmark.pl\n   ```\n\n---\n\n## **Usage**\n\nRun the script with default settings:\n```bash\n./benchmark.pl\n```\n\n### **Custom Benchmarks**\nCustomize benchmarks using command-line options:\n```bash\n./benchmark.pl \\\n  --cpu-prime=50000 \\\n  --disk-size=2G \\\n  --memory-size=20G \\\n  --iperf-server=192.168.1.100 \\\n  --app-url=http://localhost:5000\n```\n\n### **Command-Line Options**\n| Option            | Description                                  | Default Value |\n|-------------------|----------------------------------------------|---------------|\n| `--cpu-prime`     | Max prime number for CPU benchmark           | 20000         |\n| `--disk-size`     | File size for Disk I/O benchmark             | 1G            |\n| `--memory-size`   | Total size for Memory benchmark              | 10G           |\n| `--iperf-server`  | IP address of the `iperf` server             | N/A           |\n| `--app-url`       | URL of the application to benchmark          | N/A           |\n| `--help`          | Display help message                         | N/A           |\n\n### **Example Output**\n```\n\n=== Performance Benchmarking Report ===\nCPU Time: 12.345 seconds\nDisk I/O Time: 5.678 seconds\nMemory Time: 7.890 seconds\nNetwork Time: 3.456 seconds\nApplication Time: 4.321 seconds\n\nBenchmarking completed!\n```\n\n---\n\n## **Extending the Tool**\n\n### **Adding New Benchmarks**\n1. Create a new subroutine for the benchmark (e.g., `benchmark_gpu`).\n2. Add the benchmark to the main script:\n   ```perl\n   my $gpu_time = benchmark_gpu();\n   ```\n3. Update the `generate_report` subroutine to include the new benchmark.\n\n### **Example: Adding a GPU Benchmark**\n```perl\nsub benchmark_gpu {\n    print \"Running GPU benchmark...\\n\";\n    my $start_time = gettimeofday;\n    my $result = `gpustat`; # Example command\n    my $end_time = gettimeofday;\n    my $gpu_time = $end_time - $start_time;\n    print \"GPU Benchmark Result:\\n$result\\n\";\n    print \"GPU Time: $gpu_time seconds\\n\\n\";\n    return $gpu_time;\n}\n```\n\n---\n\n## **Contributing**\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b feature/new-benchmark\n   ```\n3. Commit your changes:\n   ```bash\n   git commit -m \"Add new GPU benchmark\"\n   ```\n4. Push to the branch:\n   ```bash\n   git push origin feature/new-benchmark\n   ```\n5. Open a pull request.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaiba-iqrar%2Fperformance-benchmark-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaiba-iqrar%2Fperformance-benchmark-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaiba-iqrar%2Fperformance-benchmark-tool/lists"}