aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/qdeclarativedebugging.qdoc
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-01-16 15:40:27 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-24 07:01:22 +0100
commit398e27f8907362b598fe1dfe2ecbf76bcbe530c4 (patch)
treee9e2e5d6aa117e7b5eabd8241cabc5799ec962e4 /doc/src/declarative/qdeclarativedebugging.qdoc
parentecab027748352b2529902ba3e8bd01550e0c53c3 (diff)
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 <kai.koehne@nokia.com>
Diffstat (limited to 'doc/src/declarative/qdeclarativedebugging.qdoc')
-rw-r--r--doc/src/declarative/qdeclarativedebugging.qdoc13
1 files changed, 13 insertions, 0 deletions
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