You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(profiling): add dev-profiling Cargo profile for fast iteration (#284)
Add a 'dev-profiling' Cargo profile that inherits from 'dev' with
opt-level 2. This gives meaningful profiles (inlining, vectorisation)
without the expensive LTO link step, and benefits from incremental
compilation for fast rebuilds.
Two profiling modes are now available:
Dev (fast): just skit-profiling-dev serve
Release (accurate): just skit-profiling serve
The dev mode drops target-cpu=native (vs release) so the cache stays
stable across rebuilds. Both modes enable frame pointers for pprof and
share the same HTTP profiling endpoints.
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: StreamKit Devin <devin@streamkit.dev>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
@echo "Fetching {{duration}}s CPU profile in {{format}} format..."
365
-
@echo "Note: Server must be running with profiling enabled (just skit-profiling serve)"
382
+
@echo "Note: Server must be running with profiling enabled (just skit-profiling-dev serve or just skit-profiling serve)"
366
383
@curl -s "http://127.0.0.1:4545/api/v1/profile/cpu?duration_secs={{duration}}&format={{format}}" -o {{output}}|| (echo "❌ Failed to fetch profile. Is the server running with profiling enabled?"&& exit 1)
367
384
@if [ ! -s {{output}} ] || grep -q "501 Not Implemented"{{output}}2>/dev/null; then \
368
-
echo "❌ Profiling not enabled. Start server with: just skit-profiling serve"; \
385
+
echo "❌ Profiling not enabled. Start server with: just skit-profiling-dev serve (fast) or just skit-profiling serve (release)"; \
369
386
rm -f {{output}}; \
370
387
exit 1; \
371
388
fi
@@ -395,10 +412,10 @@ profile-top duration='30':
395
412
# Fetch a heap profile from running skit server (requires Go with pprof installed)
396
413
heap-profile-fetchoutput='heap.pb.gz':
397
414
@echo "Fetching heap profile..."
398
-
@echo "Note: Server must be running with profiling enabled (just skit-profiling serve)"
415
+
@echo "Note: Server must be running with profiling enabled (just skit-profiling-dev serve or just skit-profiling serve)"
399
416
@curl -s "http://127.0.0.1:4545/api/v1/profile/heap" -o {{output}}|| (echo "❌ Failed to fetch heap profile. Is the server running with profiling enabled?"&& exit 1)
400
417
@if [ ! -s {{output}} ] || grep -q "501 Not Implemented"{{output}}2>/dev/null; then \
401
-
echo "❌ Heap profiling not enabled. Start server with: just skit-profiling serve"; \
418
+
echo "❌ Heap profiling not enabled. Start server with: just skit-profiling-dev serve (fast) or just skit-profiling serve (release)"; \
0 commit comments