dsapkqaduj6718493 2010-01-29 13:56 采纳率: 100%
浏览 24
已采纳

是否有可用于计算MediaWiki文章创建时间的钩子?

I want to time how long it takes the server to build a MediaWiki article. That is, the start time will be as close as possible to the time the server receives the request (not the time the client issues request). The end time will be when the server sends the page (again, not when the client receives the page).

Is there any Apache function I can access from PHP that gives me the time it took for the server to build the page?

Is there a MediaWiki hook that I can use to determine the static server time as early in the article-building process as possible? This looks promising but is for a future version of MediaWiki. I know I can determine the server time at the end of page creation. With those two times, I can generate a delta.

Thanks.

==Appended=== I've just discovered "mod_headers" (http://prefetch.net/blog/index.php/2007/01/02/measuring-apache-request-processing-time/) and its ability to create a header with the time it took to serve the request, in microseconds. However, I do not know how I could use that information since javascript cannot read it. I would love to be able to send it back to my server via AJAX and log it.

  • 写回答

1条回答 默认 最新

  • douken1726 2010-01-29 15:25
    关注

    This information is embedded in every page MediaWiki generates - look for something like:

    Served in 0.770 secs

    in the HTML source. Is this not what you're looking for?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line