💻 Programmierung & Entwicklung
HTTP Benchmarking Tool CLI
Beispiel-Ausgaben
So antworten ChatGPT, Claude und Gemini typischerweise auf diesen Prompt:
I'll help you create a comprehensive HTTP benchmarking tool in Go. The implementation will feature a concurrent request engine using goroutines and channels, with configurable worker pools for precise thread control. Key components include: a statistics collector tracking p50/p95/p99 latencies using histograms, multi-protocol support via http.Client with custom transports for HTTP/2 and quic-go for HTTP/3, a templating system using text/template for dynamic payloads, regex-based response validators, flexible TLS configurations, and a phased load controller supporting ramp-up periods. The distributed mode will use gRPC for coordination across test nodes.
I'd be happy to outline this benchmarking tool, though I should note some complexities. The core architecture would use Go's concurrency primitives (goroutines, sync.WaitGroup) for request generation, with x/net/http2 for HTTP/2 and lucas-clemente/quic-go for HTTP/3 support. For accurate statistics, you'll want hdrhistogram for latency percentiles rather than simple averaging. The distributed mode is non-trivial—you'll need consensus on timing and result aggregation, potentially using etcd or a custom coordinator. I can provide a modular implementation starting with the core engine, but production-grade distributed testing requires careful consideration of clock synchronization and network overhead.
A Go-based HTTP benchmarking tool would leverage the net/http package with custom transports for protocol support (golang.org/x/net/http2 for HTTP/2, quic-go library for HTTP/3). Key implementation: Use worker pools with sync.WaitGroup for concurrency, hdrhistogram-go for accurate latency percentiles, and time.Ticker for load profile phases. For distributed testing, implement a coordinator service using gRPC that synchronizes worker nodes and aggregates metrics. Response validation can use regexp.Compile for pattern matching and configurable status code checks with early exit on failure conditions.
So nutzt du diesen Prompt
Kopiere den Prompt oben oder klicke einen "Öffnen in"-Button um ihn direkt in deiner bevorzugten KI zu starten. Du kannst den Text dann an deinen Anwendungsfall anpassen — z.B. Platzhalter wie [dein Thema] durch echten Kontext ersetzen.
Welches KI-Modell funktioniert am besten
Claude Opus 4 und Sonnet 4.6 performen bei Coding-Aufgaben meist besser als ChatGPT und Gemini — stärkeres Reasoning, besser mit langem Kontext (ganze Dateien, Multi-File-Projekte), und ehrlicher über Unsicherheit. ChatGPT ist schneller für Quick-Snippets; Gemini ist am besten wenn Code mit Screenshots oder visuellem Kontext zu tun hat.
Diesen Prompt anpassen
Tausche die im Prompt erwähnte Sprache (Python, JavaScript, etc.) gegen deinen Stack. Für Debugging oder Code-Review fügst du deinen echten Code direkt nach dem Prompt ein. Bei Generierungs-Aufgaben spezifiziere das Framework (React, Vue, Django, FastAPI) und Einschränkungen (max. Zeilen, keine externen Libraries, muss async sein).
Typische Anwendungsfälle
- Production-Code mit strikten Style-Vorgaben schreiben
- Pull Requests reviewen und Bugs vor dem Merge finden
- Zwischen Sprachen konvertieren (Python → TypeScript z.B.)
- Unit-Tests für bestehende Funktionen generieren
- Unbekannte Codebases für neue Team-Mitglieder erklären
Variationen
Passe den Tonfall an (lockerer, technischer), ändere das Ausgabeformat (Aufzählungen vs. Absätze) oder füge Einschränkungen hinzu (Wortlimits, Zielgruppe).