/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// An AsyncEvent generates an 'S' (start) event when constructed and a 'F' (finish) event when it // is destructed.
// The Trace Event specification claims that these event types are deprecated and replaces by // nestable 'b' (begin) and 'e' (end) events, but Chrome does not seem to support those.
// To generate a pair of 'S' and 'F' events, create an AsyncEvent object using the AsyncEvent(const // char* sName) constructor when you want the 'S' event to be generated, and destroy it when you // want the corresponding 'F' event to be generated.
class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent, public std::enable_shared_from_this<AsyncEvent>
{ staticint s_nIdCounter; int m_nId; bool m_bBeginRecorded;
AsyncEvent(constchar* sName, int nId, const std::map<OUString, OUString>& args)
: NamedEvent(sName, args)
, m_nId(nId)
, m_bBeginRecorded(false)
{ if (!s_bRecording) return;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.