document.addEventListener('DOMContentLoaded', function() { // Initialize UI elements const stepValueElement = document.querySelector('.step-value'); let currentStep = 0; // Step control functions function updateStep(increment = 1) { currentStep += increment; stepValueElement.textContent = `0x${currentStep.toString(16).toUpperCase()}`; // Update other UI elements as needed } // Setup control button event listeners document.querySelectorAll('.control-button').forEach(button => { if (button.querySelector('[data-feather="play"]')) { button.addEventListener('click', () => { // Run logic }); } if (button.querySelector('[data-feather="pause"]')) { button.addEventListener('click', () => { // Pause logic }); } if (button.querySelector('[data-feather="skip-back"]')) { button.addEventListener('click', () => updateStep(-1)); } if (button.querySelector('[data-feather="skip-forward"]')) { button.addEventListener('click', () => updateStep(1)); } }); // Initialize charts const gpuOptions = { series: [{ name: 'Utilization', data: [30, 40, 35, 50, 49, 60, 70, 91] }], chart: { type: 'area', height: '100%', sparkline: { enabled: true }, toolbar: { show: false } }, colors: ['#6366f1'], fill: { type: 'gradient', gradient: { shadeIntensity: 1, opacityFrom: 0.7, opacityTo: 0.3, } }, stroke: { curve: 'smooth', width: 2 }, tooltip: { enabled: false } }; const timeOptions = { series: [{ name: 'Time', data: [12, 14, 10, 8, 6, 5, 4] }], chart: { type: 'line', height: '100%', sparkline: { enabled: true }, toolbar: { show: false } }, colors: ['#8b5cf6'], stroke: { curve: 'smooth', width: 2 }, tooltip: { enabled: false } }; const memoryOptions = { series: [75], chart: { type: 'radialBar', height: '100%', sparkline: { enabled: true } }, plotOptions: { radialBar: { startAngle: -90, endAngle: 90, track: { background: "#374151", strokeWidth: '97%', margin: 5, }, dataLabels: { name: { show: false }, value: { offsetY: -2, fontSize: '16px', color: '#f3f4f6' } } } }, colors: ['#ec4899'], }; const gpuChart = new ApexCharts(document.querySelector("#gpuChart"), gpuOptions); const timeChart = new ApexCharts(document.querySelector("#timeChart"), timeOptions); const memoryChart = new ApexCharts(document.querySelector("#memoryChart"), memoryOptions); gpuChart.render(); timeChart.render(); memoryChart.render(); // Generate thread visualization const threadGrid = document.getElementById('threadGrid'); for (let i = 0; i < 64; i++) { const thread = document.createElement('div'); thread.className = 'bg-gray-700 rounded p-2 text-center text-xs flex flex-col items-center justify-center hover:bg-gray-600 transition cursor-pointer'; thread.innerHTML = `