From 81413799eb4f38d62710b295268249307364000a Mon Sep 17 00:00:00 2001 From: László Németh Date: Tue, 28 Mar 2017 16:32:25 +0200 Subject: comphelper: add a profiling API Using the guard style ProfileZone aZone("foo"). Test macro: Sub TimeLog toolkit = createUnoService("com.sun.star.awt.Toolkit") toolkit.startRecording() toolkit.processEventsToIdle() toolkit.stopRecording() a = toolkit.getRecordingAndClear() s = "" For Each i in a s = s + i + ", " Next i Print s End Sub Change-Id: Iceaf9143d0387c87e7936dc67eecbbf71ee8d74a Reviewed-on: https://gerrit.libreoffice.org/38786 Reviewed-by: Miklos Vajna Reviewed-by: Noel Grandin Tested-by: Jenkins --- offapi/com/sun/star/awt/XToolkitExperimental.idl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'offapi') diff --git a/offapi/com/sun/star/awt/XToolkitExperimental.idl b/offapi/com/sun/star/awt/XToolkitExperimental.idl index 5764ef5fc44f..958c80c1cb9b 100644 --- a/offapi/com/sun/star/awt/XToolkitExperimental.idl +++ b/offapi/com/sun/star/awt/XToolkitExperimental.idl @@ -34,6 +34,28 @@ interface XToolkitExperimental : XToolkit2 /** Pause the main thread of LibreOffice for the requested amount of time. */ void pause([in] long nMilliseconds); + + /** Start time logging. + + @since LibreOffice 6.0 + */ + void startRecording(); + + /** Stop time logging. + + @since LibreOffice 6.0 + */ + void stopRecording(); + + /** Query time logs and clear recording. + First line is the time of the recorded operations in seconds, + next ones are the log lines. A log line contains the thread ID, + time stamp, profile zone ID and "start" or "stop". + + @since LibreOffice 6.0 + */ + sequence getRecordingAndClear(); + }; }; }; }; }; -- cgit v1.2.3