profile.html revision 998276643802ff9fb197fe220cbd9552da00a624
<!doctype html>
<html>
<head>
<title>Test Page</title>
.markup {
clear: both;
}
.yui-skin-sam #c .yui-console {
position: relative;
top: auto;
right: auto;
}
#c {
margin-bottom: 1em;
}
</style>
</head>
<body class="yui-skin-sam">
<div class="markup">
<div id="c"></div>
<input type="button" id="foo" value="Log foo msg">
<input type="button" id="info" value="Log info msg">
<input type="button" id="warn" value="Log warn msg">
<input type="button" id="error" value="Log error msg">
<button type="button" id="hide">Hide</button>
<button type="button" id="show">Show</button>
<button type="button" id="collapse">Collapse</button>
<button type="button" id="expand">Expand</button>
<button type="button" id="destroy">Destroy</button>
<button type="button" id="throttle">Throttle</button>
<button type="button" id="report">Report</button>
</div>
<script type="text/javascript">
YUI({
base: '/build/',
//logLevel: 'warn',
filter: 'debug',
//logInclude : { global: true },
useBrowserConsole:false
}).use('profile-report','table','console','profiler', function (Y) {
/****************************************************************************/
/*********************** Testing area begins here **************************/
/****************************************************************************/
var P = Y.Profiler;
P.registerConstructor('Console',Y);
var yconsole = new Y.Console({
//verbose : true,
//consoleLimit : 10,
logLevel : "Garbage",
newestOnTop : false
});
P.renderFullReport("Construction");
P.unregisterConstructor('Console',Y);
P.registerObject(yconsole);
yconsole.render('#c');
P.renderFullReport("Render");
/*
Y.log('testing');
Y.log('testing known category','info');
Y.log('testing new category','foo');
Y.log('testing known source','info','global');
Y.log('testing new source','info','bar');
yconsole.log("Test from the console object",'info','Console');
*/
var x = {
foo : 0,
info : 0,
warn : 0,
error : 0
};
Y.get('#hide').on('click', function () { yconsole.hide(); });
Y.get('#show').on('click', function () { yconsole.show(); });
Y.get('#collapse').on('click', function () { yconsole.collapse(); });
Y.get('#expand').on('click', function () { yconsole.expand(); });
Y.get('#destroy').on('click', function () { yconsole.destroy(); });
Y.get('#throttle').on('click', function () {
for (var i = 0; i < 500; ++i) {
}
});
});
</script>
</body>
</html>