ColdFusion - How to get server parformace metrics

GetMetricData() - get server parformace metrics

GetMetricData.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GetMetricData function example: how to get server parformace metrics</title>
</head>

<body>
<h2 style="color:Crimson">GetMetricData Function Example</h2>

<cfset MetricDataPERF=GetMetricData("perf_monitor")>
<cfdump var="#MetricDataPERF#" label="Metric Data[perf_monitor]">

<cfset MetricDataSimpleLoad=GetMetricData("simple_load")>
<cfset MetricDataPreviousReqTime=GetMetricData("prev_req_time")>
<cfset MetricDataAvgReqTime=GetMetricData("avg_req_time")>


<cfoutput>
 <b>MetricData Simple Load[simple_load]:</b> #MetricDataSimpleLoad#
 <br />
 <b>MetricData Previuos Request Time[prev_req_time]:</b> #MetricDataPreviousReqTime#
    <br />
 <b>MetricData Avarage Request Time[avg_req_time]:</b> #MetricDataAvgReqTime#
</cfoutput>

</body>
</html>






More ColdFusion examples