// Begins an event for |id| with |name|. |path| tells where in the directory // structure the event is happening (and may be blank). |size| is the number // of bytes involved in the event.
virtual void FileTracingEventBegin(constchar* name, constvoid* id, const FilePath& path,
int64_t size) = 0;
// Ends an event for |id| with |name|.
virtual void FileTracingEventEnd(constchar* name, constvoid* id) = 0;
};
// Sets a global file tracing provider to query categories and record events. staticvoid SetProvider(Provider* provider);
// Enables file tracing while in scope. class ScopedEnabler {
public:
ScopedEnabler();
~ScopedEnabler();
};
// Called only if the tracing category is enabled. |name| is the name of the // event to trace (e.g. "Read", "Write") and must have an application // lifetime (e.g. static or literal). |file| is the file being traced; must // outlive this class. |size| is the size (in bytes) of this event. void Initialize(constchar* name, const File* file, int64_t size);
private: // The ID of this trace. Based on the |file| passed to |Initialize()|. Must // outlive this class.
raw_ptr<constvoid> id_ = nullptr;
// The name of the event to trace (e.g. "Read", "Write"). Prefixed with // "File". constchar* name_;
};
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 und die Messung sind noch experimentell.