首页 > 用firebug的profile分析程序运行时间,总是返回“无任何可记录的活动”

用firebug的profile分析程序运行时间,总是返回“无任何可记录的活动”

想用firebug的console.profile()测试不同jquery选择器的效率,按照以下方法在控制台中输入:
console.profile('测试一')
$parent.find('.child');
console.profileEnd()
显示“无任何可记录的活动”

html结构如下:

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style id="jsbin-css">
</style>
</head>
<body>
  <div id="parent">
    <div class="child"></div>
  </div>
<script>
    $parent = $('#parent');
</script>
</body>
</html>

按照http://www.ruanyifeng.com/blog/2011/03/firebug_console_tutorial.html第九点操作也是这个结果,请问是怎么回事呢?

【热门文章】
【热门文章】