Skip to content

gitRasheed/FleetRPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FleetRPC

gRPC device fleet reservation service built with Connect.

Quick Start

go run ./cmd/server

CLI Client

go run ./cmd/client reserve --user USER --type iphone
go run ./cmd/client release --device-id iphone-2
go run ./cmd/client watch

Tests

# Integration tests
go test -v ./test

# With race detection
go test -v -race ./test

Benchmarks

# All benchmarks
go test -bench . -benchmem ./benchmark

# Server RPC benchmark only
go test -bench BenchmarkServer -benchmem ./benchmark

# With CPU profiling
cd benchmark
go test -run=NONE -bench=BenchmarkServer -benchtime=3s -cpuprofile cpu.prof
go tool pprof -text cpu.prof

Metrics

# Bash/Linux/macOS
curl localhost:8080/metrics | grep devicefleet
# PowerShell/Windows
(curl localhost:8080/metrics).Content | Select-String devicefleet

Build

go build ./...
go build -race ./...

Proto Generation

buf generate

Endpoints

Endpoint Description
:8080/devicefleet.v1.DeviceService/* Connect RPCs
:8080/metrics Prometheus metrics

About

Simple concurrency testing a device reservation system with gRPC in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages