mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-26 09:35:52 +00:00
* fix: update Go CI workflow and fix formatting issues - Update Go version from 1.21.x to 1.24.x to match go.mod requirements - Fix Go module cache path to use linux/go.sum instead of **/go.sum - Run gofmt on all Go files to fix formatting issues - Fix benchmark files formatting - Fix linux/pkg/api/server.go formatting This resolves the GitHub Actions CI failures related to: - Missing go.sum file (wrong cache path) - Go version mismatch - Code formatting violations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: add platform-specific syscall.Select wrappers for Linux/Darwin compatibility - Create select_linux.go: handles syscall.Select returning (n int, err error) - Create select_darwin.go: handles syscall.Select returning (err error) - Update select.go to use platform-agnostic selectCall function - Resolves typecheck errors while maintaining compatibility on both platforms Tested on both macOS and Linux targets successfully. --------- Co-authored-by: Claude <noreply@anthropic.com>
39 lines
1,014 B
Go
39 lines
1,014 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
hostname string
|
|
port int
|
|
verbose bool
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "vibetunnel-bench",
|
|
Short: "VibeTunnel Protocol Performance Benchmark Tool",
|
|
Long: `A comprehensive benchmarking tool for VibeTunnel server-client protocol.
|
|
Tests session management, SSE streaming, and concurrent user performance.
|
|
|
|
Examples:
|
|
vibetunnel-bench session --host localhost --port 4026
|
|
vibetunnel-bench stream --host localhost --port 4026 --sessions 5
|
|
vibetunnel-bench load --host localhost --port 4026 --concurrent 50`,
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.PersistentFlags().StringVar(&hostname, "host", "localhost", "VibeTunnel server hostname")
|
|
rootCmd.PersistentFlags().IntVar(&port, "port", 4026, "VibeTunnel server port")
|
|
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enable verbose output")
|
|
}
|
|
|
|
func Execute() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|