IIS 日志中的 95% 平均百分比
我正在准备进行生产推送,不幸的是以前的系统没有记录性能统计数据。
我有 IIS 日志,并且能够计算吞吐量和平均/最大要求。
有没有办法计算 95% 时间平均值和最大要求,以便数字不包括最大值?我对频谱的整个范围不感兴趣,我只想删除一些最大超时,以更好地近似当前系统的吞吐量。
我当前的查询是
SELECT
DatePart(Year,date_time),
DatePart(Month,date_time),
DatePart(Day,date_time),
DatePart(hh,date_time),
count(*) as [Req/h],
COUNT(*)/3600 as [Req/s],
COUNT(*)/60 as [Req/m],
sum([time-taken]) / count(*) as AverageServerTime,
Max([time-taken]) as MaxServerTime
FROM [iis_logs].[dbo].[events]
where
uri_stem like 'stemprefix/%' and
host ='www.domain.com'
and date_time > '11/8/2011'
and date_time < '11/9/2011'
group by
DatePart(Year,date_time),
DatePart(Month,date_time),
DatePart(Day,date_time),
DatePart(hh,date_time)
I'm getting ready for a production push and unfortuanally the previous system does not document performance stats.
I have the IIS logs and have been able to calculate Throughput and average/max requirements.
Is there a way to calculate the 95% time average and max requirements so that the figures don't include the max values? I'm not interested in the full rang of the spectrum, I just want to drop a few of the max times out to see a beter approximation of what the throughput of the current system is.
My Current Query is
SELECT
DatePart(Year,date_time),
DatePart(Month,date_time),
DatePart(Day,date_time),
DatePart(hh,date_time),
count(*) as [Req/h],
COUNT(*)/3600 as [Req/s],
COUNT(*)/60 as [Req/m],
sum([time-taken]) / count(*) as AverageServerTime,
Max([time-taken]) as MaxServerTime
FROM [iis_logs].[dbo].[events]
where
uri_stem like 'stemprefix/%' and
host ='www.domain.com'
and date_time > '11/8/2011'
and date_time < '11/9/2011'
group by
DatePart(Year,date_time),
DatePart(Month,date_time),
DatePart(Day,date_time),
DatePart(hh,date_time)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎符合我的要求(它不按小时报告,但对于我的目的来说已经足够好了)。
This seems to do what I'm looking for (it doesn't report based on hour, but that good enough for my purposes).