add firefox extension template
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package webextension_polyfill.geckoprofiler;
|
||||
|
||||
typedef ProfilerFeature = String;
|
@@ -0,0 +1,31 @@
|
||||
package webextension_polyfill.geckoprofiler;
|
||||
|
||||
typedef StartSettingsType = {
|
||||
/**
|
||||
The maximum size in bytes of the buffer used to store profiling data. A larger value allows capturing a profile that
|
||||
covers a greater amount of time.
|
||||
**/
|
||||
var bufferSize : Float;
|
||||
/**
|
||||
The length of the window of time that's kept in the buffer. Any collected samples are discarded as soon as they are
|
||||
older than the number of seconds specified in this setting. Zero means no duration restriction.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var windowLength : Float;
|
||||
/**
|
||||
Interval in milliseconds between samples of profiling data. A smaller value will increase the detail of the profiles
|
||||
captured.
|
||||
**/
|
||||
var interval : Float;
|
||||
/**
|
||||
A list of active features for the profiler.
|
||||
**/
|
||||
var features : Array<ProfilerFeature>;
|
||||
/**
|
||||
A list of thread names for which to capture profiles.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var threads : Array<String>;
|
||||
};
|
47
externs/webextension_polyfill/geckoprofiler/Static.hx
Normal file
47
externs/webextension_polyfill/geckoprofiler/Static.hx
Normal file
@@ -0,0 +1,47 @@
|
||||
package webextension_polyfill.geckoprofiler;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
Starts the profiler with the specified settings.
|
||||
**/
|
||||
function start(settings:StartSettingsType):Void;
|
||||
/**
|
||||
Stops the profiler and discards any captured profile data.
|
||||
**/
|
||||
function stop():Void;
|
||||
/**
|
||||
Pauses the profiler, keeping any profile data that is already written.
|
||||
**/
|
||||
function pause():Void;
|
||||
/**
|
||||
Resumes the profiler with the settings that were initially used to start it.
|
||||
**/
|
||||
function resume():Void;
|
||||
/**
|
||||
Gathers the profile data from the current profiling session, and writes it to disk.
|
||||
The returned promise resolves to a path that locates the created file.
|
||||
**/
|
||||
function dumpProfileToFile(fileName:String):Void;
|
||||
/**
|
||||
Gathers the profile data from the current profiling session.
|
||||
**/
|
||||
function getProfile():Void;
|
||||
/**
|
||||
Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that
|
||||
contains a JSON string.
|
||||
**/
|
||||
function getProfileAsArrayBuffer():Void;
|
||||
/**
|
||||
Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that
|
||||
contains a gzipped JSON string.
|
||||
**/
|
||||
function getProfileAsGzippedArrayBuffer():Void;
|
||||
/**
|
||||
Gets the debug symbols for a particular library.
|
||||
**/
|
||||
function getSymbols(debugName:String, breakpadId:String):Void;
|
||||
/**
|
||||
Fires when the profiler starts/stops running.
|
||||
**/
|
||||
var onRunning : webextension_polyfill.events.Event<(isRunning:Bool) -> Void>;
|
||||
};
|
3
externs/webextension_polyfill/geckoprofiler/Supports.hx
Normal file
3
externs/webextension_polyfill/geckoprofiler/Supports.hx
Normal file
@@ -0,0 +1,3 @@
|
||||
package webextension_polyfill.geckoprofiler;
|
||||
|
||||
typedef Supports = String;
|
Reference in New Issue
Block a user