自由格式报告中可能会使用以下查询,以便通过百分比的形式呈现表中各个值的分布情况,如下面的图表中所示:

在上面的图表中,可以看出各个值所占比例(百分比):低于 11.5 (0%)、低于 804.74 (~50%) 和低于 1435.53 (100%)。
如果 SLA 指定类似于“x% 的值应低于 y”的目标,则此自由格式的结果可帮助找出确保符合 SLA 的 x, y 值。
在查询中使用了下列参数:
为了获得最佳结果,可对数据源或 T_SLALOM_OUTPUTS 运行查询。
以下查询将生成上图:
select val,100*records/(select count(*) from (@Query))
from
(
select x.bucket_val val,
sum(y.records) records
from
(
select round(val/bucket_size,0)*bucket_size bucket_val,
count(*) records
from
(
select (max(val)-min(val))/@Buckets bucket_size
from
(
@Query
)
) params,
(
@Query
) source
group by round(val/bucket_size,0)*bucket_size
order by round(val/bucket_size,0)*bucket_size
) x,
(
select round(val/bucket_size,0)*bucket_size bucket_val,
count(*) records
from
(
select (max(val)-min(val))/@Buckets bucket_size
from
(
@Query
)
) params,
(
@Query
) source
group by round(val/bucket_size,0)*bucket_size
order by round(val/bucket_size,0)*bucket_size
) y
where y.bucket_val @Relation x.bucket_val
group by x.bucket_val
order by x.bucket_val
)
下面是可以使用的示例参数列表(XML 结构):
<custom>
<connection>
<params/>
</connection>
<query>
<params>
<param name="@Query" disp_name="Data Type" type="LIST">
<value>PDP Context Activation Success</value>
<list>
<item>
<value>select success_rate as val from PDP_Context_Activation_Success.CSV</value>
<text>PDP Context Activation Success</text>
</item>
<item>
<value>select throughput as val from [gprs throughput volume by apn.csv]</value>
<text>Throughput of a Single APN</text>
</item>
<item>
<value>select throughput as val from [Generic GPRS Throughput.CSV]</value>
<text>Generic Throughput</text>
</item>
</list>
</param>
<param name="@Buckets" disp_name="X Axis Values" type="LIST">
<value>100</value>
<list>
<item>
<value>25</value>
<text>25</text>
</item>
<item>
<value>50</value>
<text>50</text>
</item>
<item>
<value>100</value>
<text>100</text>
</item>
<item>
<value>250</value>
<text>250</text>
</item>
<item>
<value>500</value>
<text>500</text>
</item>
<item>
<value>1000</value>
<text>1000</text>
</item>
</list>
</param>
<param name="@Relation" disp_name="Violation of threshold means" type="LIST">
<value>providing too little</value>
<list>
<item>
<value>>=</value>
<text>providing too little</text>
</item>
<item>
<value><=</value>
<text>providing too much</text>
</item>
</list>
</param>
</params>
</query>
</custom>
| 版权所有 © 2012 CA。 保留所有权利。 | 就该主题发送电子邮件至 CA Technologies |