A lightweight system stress-testing and performance monitoring tool written in Scala with ZIO.
Scala ZIO Combinators / Fibers ZIO HTTP OSHI
- CPU - Monitor and test CPU performance under load
- Memory - RAM stress testing with configurable memory allocation
- Metrics - Live system performance monitoring via HTTP API
- Java 25
- Scala 3.7.4
- sbt 1.11.7
git clone https://github.com/nasrlol/torque
cd torque
sbt runOr get it from my gitea
git clone https://git.nsrddyn.com/nasr/torque
cd torque
sbt runStart the Torque server:
sbt runTODO: Explanation on how to run the tests
The server will start on http://localhost:8080 with the following endpoints:
GET /platform- API statusGET /cpu- CPU performance metrics and stress testingGET /ram- RAM usage metrics and memory allocation tests
# Check server status
curl http://localhost:8080/
# Get CPU metrics
curl http://localhost:8080/cpu
# Get RAM metrics
curl http://localhost:8080/ramTorque is built using modern Scala functional programming patterns:
- ZIO - For effect management and concurrency
- ZIO HTTP - For high-performance HTTP server
- OSHI - For cross-platform system information
.
├── LICENSE
├── README.md
├── build.sbt
├── project
│ ├── build.properties
├── src
│ └── main
│ └── scala
│ └── main
│ ├── Main.scala
│ ├── domain
│ │ ├── CpuOperations.scala
│ │ └── MemoryOperations.scala
│ ├── infrastructure
│ │ ├── Http.scala
│ │ ├── Resources.scala
│ │ └── routes
│ │ └── Routes.scala
│ └── services
│ ├── Benchmark.scala
│ └── Stress.scala
sbt compileGET /cpu
Returns CPU utilization metrics and allows initiating stress tests.
GET /ram
Returns memory usage statistics and memory allocation test results.
This project is licensed under the MIT License - see the LICENSE file for details.