哪些实用程序可以提供每页的数据库点击次数/持续时间?

发布于 2024-07-06 20:57:17 字数 142 浏览 6 评论 0原文

SQL Server 探查器非常适合分析 Web 应用程序的 SQL Server 性能。 但是,当我测试我的网络应用程序时,我想要每页数据库点击/持续时间的摘要。

有人知道有什么实用程序可以为您提供此类信息吗?

SQL Server profiler is great for profiling SQL Server performance for web apps. However, when I'm testing my webapp I'd like a summary of database hits/duration per page.

Does anybody know of any utilities for giving you this kind of information?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

兔姬 2024-07-13 20:57:17

如果你想要每页的持续时间,我推荐谷歌分析。

如果您想要数据库点击的摘要(即,您在一页加载期间运行三个过程,因此您想要显示三的计数),那么我建议将审核代码添加到您的存储过程中。

或者(尽管在处理方面成本更高),您可以打开 SQL Profiler 或 SQL Trace,然后以这种方式跟踪数据库命中以对它们执行统计分析。

If you want duration per page, I'd recommand Google Analytics.

If you want a summary of database hits (ie, you run three procedures during one page load so you want to show a count of three) then I would recommend adding auditing code to your sprocs.

Alternately (though more expensively in terms of processing) you could turn on either SQL Profiler or SQL Trace and then track the database hits that way to perform statistical analysis on them.

最舍不得你 2024-07-13 20:57:17

我建议设置一个将用于所有站点的数据访问例程。

这个例程/类/或任何您喜欢的内容都可以登录数据库或记录所有“点击”、它们的持续时间、错误(是否有)、超时等。

如果您正确编程,您将能够知道如何许多数据库点击/页面加载,平均(DBHit)+您将获得免费奖励“最长的SProc,最短的,更常被调用”。

这样做的积极的一面是,您不需要修改任何存储过程,并且可以在对数据库的访问周围有一个漂亮的小“包装器”。

对于“每页持续时间”,如果您使用谷歌分析,您将无法将信息与您在数据库服务器上获得的信息合并回来。 因此,我建议记录对数据库中页面的每次访问。

然后您可以推断出 Page1.StartTime = getdate()、Page1.EndTime = (page2.Starttime-1 或 session.log_off_time) 例如。 [这个有点基础,但是根据你的环境你可以改进它]。

I would recommend setting a data access routine that will be used for all the site.

This routine/class/or whatever you like could log in the database or in a log all the "hits", their duration, error (is any), timeout, etc.

If you program it properly, you will be able to know how many DB hit / page load, avg(DBHit) + you will get as a free bonus the "longest SProc, shortest, more often called".

The positive side of this is that you don't need to modify any stored proc and you can have a nice little "wrapper" around your access to the DB.

For the "Duration per page", if you go with google analysis you will not be able to merge the information back with what you got on the database server. So I would recommend logging each access to a page in the DB.

Then you can infer that Page1.StartTime = getdate(), Page1.EndTime = (page2.Starttime-1 or session.log_off_time) for example. [This is a little basic but according to your environment you can improve it].

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文