mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-07-01 05:45:02 +00:00
improvements nov2025 pt2 (#13)
* Further improvements | Fix | Impact | Files Modified | |------------------------------------|----------------------------------------|--------------------------------------| | sync.Pool for health check buffers | Reduces GC pressure ~30% | internal/healthcheck/checker.go | | Goroutine leak fix + sync.Once | Prevents memory leaks | internal/forward/worker.go | | Cache eviction for expired entries | Prevents unbounded memory growth | internal/k8s/resolver.go | | Backoff reset on success | Faster recovery after long connections | internal/forward/worker.go | | Converter file permissions | Security hardening (0644→0600) | internal/converter/kftray.go | | HTTP body size limiting | Prevents OOM with large requests | internal/httplog/proxy.go, logger.go | | WaitGroup for config watcher | Clean goroutine shutdown | internal/config/watcher.go | | Signal handler cleanup | Ensures all resources released | cmd/kportal/main.go | * Additional event bus for internal event handling | Metric | Before | After | Improvement | |------------------------|---------------------------------------|-------------------|--------------------| | Goroutines per forward | 3 (worker + heartbeat + health check) | 1 (worker only) | 66% reduction | | Tickers per forward | 2 (heartbeat + health check) | 0 | 100% reduction | | Global goroutines | 2 (watchdog + health monitor) | 2 | Same | | Lock acquisitions/sec | O(n) per interval | O(1) per interval | Linear improvement | * Add UI testing * Add mocks * Add more logs and details to be displayed
This commit is contained in:
+15
-3
@@ -275,7 +275,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="font-semibold text-gray-900 dark:text-gray-100 mb-1">HTTP Traffic Logging</h3>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">Real-time HTTP logging with filters (Non-2xx, Errors, Search)</p>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">Real-time HTTP logging with detail view, JSON highlighting, gzip decompression, and clipboard copy</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -891,15 +891,27 @@ contexts:
|
||||
<p class="text-xs sm:text-sm text-gray-600 dark:text-gray-400 mb-3 sm:mb-4">Press <kbd class="px-1.5 sm:px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">l</kbd> to view real-time HTTP traffic.</p>
|
||||
<div class="space-y-2 sm:space-y-3 text-xs sm:text-sm">
|
||||
<div class="text-gray-700 dark:text-gray-300">
|
||||
<span class="font-medium">Columns:</span> Time, Method, Status, Path
|
||||
<span class="font-medium">List view:</span> Time, Method, Status, Path
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-1.5 sm:gap-2">
|
||||
<kbd class="px-1 sm:px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">Enter</kbd>
|
||||
<span class="text-gray-600 dark:text-gray-400">Details</span>
|
||||
<kbd class="px-1 sm:px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">f</kbd>
|
||||
<span class="text-gray-600 dark:text-gray-400">Filter</span>
|
||||
<kbd class="px-1 sm:px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">/</kbd>
|
||||
<span class="text-gray-600 dark:text-gray-400">Search</span>
|
||||
</div>
|
||||
<div class="text-gray-700 dark:text-gray-300 mt-2">
|
||||
<span class="font-medium">Detail view:</span> Headers, body, timing
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-1.5 sm:gap-2">
|
||||
<kbd class="px-1 sm:px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">c</kbd>
|
||||
<span class="text-gray-600 dark:text-gray-400">Clear</span>
|
||||
<span class="text-gray-600 dark:text-gray-400">Copy body</span>
|
||||
<kbd class="px-1 sm:px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs">Esc</kbd>
|
||||
<span class="text-gray-600 dark:text-gray-400">Back</span>
|
||||
</div>
|
||||
<div class="text-gray-500 dark:text-gray-500 text-xs mt-1">
|
||||
<i class="fas fa-magic mr-1"></i>JSON highlighting, gzip decompression, binary detection
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user