| Server IP : 138.197.176.125 / Your IP : 216.73.216.41 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/vtigergoogleoffice365suite65phase2qa/ |
Upload File : |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Execution Time Chart</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<h1>File Execution Times</h1>
<canvas id="executionTimeChart" width="800" height="400"></canvas>
<script>
fetch('getLogData1.php')
.then(response => response.json())
.then(data => {
// Prepare chart data
const labels = [];
const datasets = [];
data.forEach(fileData => {
const fileLabel = fileData.file;
labels.push(fileLabel);
datasets.push({
label: fileLabel,
data: fileData.executionTimes.map(entry => entry.executionTime),
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1,
fill: false
});
});
const ctx = document.getElementById('executionTimeChart').getContext('2d');
new Chart(ctx, {
type: 'bar',
data: {
labels: labels,
datasets: datasets
},
options: {
scales: {
x: {
title: {
display: true,
text: 'Files'
}
},
y: {
title: {
display: true,
text: 'Execution Time (seconds)'
},
beginAtZero: true
}
},
responsive: true,
plugins: {
legend: {
display: true
},
tooltip: {
callbacks: {
label: function(tooltipItem) {
return tooltipItem.dataset.label + ': ' + tooltipItem.raw + ' seconds';
}
}
}
}
}
});
})
.catch(error => console.error('Error fetching execution times data:', error));
</script>
</body>
</html>