From 398e27f8907362b598fe1dfe2ecbf76bcbe530c4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 16 Jan 2012 15:40:27 +0100 Subject: Console API: Add console.count console.count can be handy to check how often code snippets are executed. Change-Id: I0eaf17ab893c76e7b8956122aa31e218745e92bf Reviewed-by: Kai Koehne --- doc/src/declarative/qdeclarativedebugging.qdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index d8e7842b09..c59952dafc 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -71,6 +71,19 @@ function f() { it was called. The stack trace info contains function name, file name, line number and column number. The stack trace is limited to last 10 stack frames. +\section2 Count + +\c console.count prints the current number of times a particular piece of code has been executed, +along with a message. That is, + +\qml +function f() { + console.count("f called"); +} +\endqml + +will print \c{f called: 1}, \c{f called: 2} ... whenever \c{f()} is executed. + \section2 Profile \c console.profile turns on the QML and JavaScript profilers. Nested calls are not -- cgit v1.2.3