| 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 : |
<?php
// Include necessary files
include_once 'include/Webservices/Relation.php';
include_once 'vtlib/Vtiger/Module.php';
include_once 'includes/main/WebUI.php';
global $adb;
// Query to get all data from the table
$query = "SELECT * FROM app_execution_time";
$result = $adb->pquery($query, []);
// Initialize the array to store formatted data
$data = [];
// Loop through the results and format each row
while ($row = $adb->fetch_array($result)) {
// Extract values from the row
$timestamp = $row['createdtime']; // Assuming createdtime is the timestamp
$action = $row['action'];
$file = $row['request_uri']; // Assuming request_uri is the file or endpoint
$responseTime = $row['executiontime']; // Assuming executiontime is the response time
if (!isset($data[$file])) {
$data[$file] = ['file' => $file, 'executionTimes' => []];
}
$data[$file]['executionTimes'][] = ['timestamp' => $timestamp, 'executionTime' => (float)$responseTime];
}
$output = array_values($data);
echo json_encode($output);
?>