-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_server_benchmark.py
More file actions
35 lines (27 loc) · 1.03 KB
/
Copy pathstart_server_benchmark.py
File metadata and controls
35 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
import threading
import time
from core.webhook_listener import WebhookListener
from core.enhanced_executor import EnhancedPipelineExecutor
from shared_queue import job_queue
def start_benchmarked_server():
print("Starting CI/CD Pipeline Server with Benchmarking...")
# Start webhook listener in background
def webhook_worker():
listener = WebhookListener(job_queue)
listener.start()
webhook_thread = threading.Thread(target=webhook_worker, daemon=True)
webhook_thread.start()
print("Webhook listener: http://localhost:8080/webhook")
print("Benchmarking: Enabled")
# Wait for webhook to start
time.sleep(2)
# Start enhanced executor with benchmarking
print("Starting enhanced job executor with performance tracking...")
executor = EnhancedPipelineExecutor(job_queue)
try:
executor.run_worker()
except KeyboardInterrupt:
print("\nBenchmarked server stopped!")
if __name__ == "__main__":
start_benchmarked_server()