Module percept2

Percept2 - An Enhanced version of the Erlang Concurrency Profiling Tool Percept.

Behaviours: application.

Description

Percept2 - An Enhanced version of the Erlang Concurrency Profiling Tool Percept.

Percept2 extends Percept in two aspects: functionality and scalability. Among the new functionalities added to Percept are: The following techniques have been used to improved the scalability of Percept. This module provides the user interface for the application.

Data Types

filespec()

filespec() = file:filename() | {file:filename(), wrap, Suffix::string(), WrapSize::pos_integer()} | {file:filename(), wrap, Suffix::string(), WrapSize::pos_integer(), MaxFileCnt::pos_integer()}

function_name()

function_name() = atom()

module_name()

module_name() = atom()

trace_profile_option()

trace_profile_option() = procs_basic | ports_basic | procs | ports | schedulers | running | message | migration | garbage_collection | s_group | all | {callgraph, [module_name()]}

Function Index

analyze/1Parallel analysis of trace files.
analyze/4Parallel analysis of trace files.
profile/2Starts the profiling while an application of interest is already running.
profile/3The profiling starts with executing the entry function given, and goes on for the whole duration until the entry function returns and the profiling has concluded.
start_webserver/0Starts webserver.
start_webserver/1Starts webserver with a given port number.
stop_db/0Stops the percept2 database.
stop_profile/0Stops the profiling.
stop_webserver/0Stops webserver.
stop_webserver/1Stops webserver of the given port.

Function Details

analyze/1

analyze(FileNames::[file:filename()]) -> ok | {error, any()}

Parallel analysis of trace files. See the Overview page for examples.

analyze/4

analyze(Filename::file:filename(), Suffix::string(), StartIndex::pos_integer(), EndIndex::pos_integer()) -> ok | {error, any()}

Parallel analysis of trace files. See the Overview page for examples.

profile/2

profile(FileSpec::filespec(), TraceProfileOptions::[trace_profile_option()]) -> {ok, integer()} | {already_started, port()}

Starts the profiling while an application of interest is already running. The profiling can be stopped by percept2:stop_profile/0. The valid TraceProfileOptions values are: procs, ports, schedulers, running, message, migration and all. See profile/3 for the descriptions of the options.

See also: stop_profile/0.

profile/3

profile(FileSpec::filespec(), Entry::{module_name(), function_name(), [term()]}, TraceProfileOptions::[trace_profile_option()]) -> ok | {already_started, port()}

The profiling starts with executing the entry function given, and goes on for the whole duration until the entry function returns and the profiling has concluded. The events to be traced/profiled depends on the options specified by TraceProfileOptions. The following options are available:

-- procs_basic : only profile basic process activities including spawn, exit, register. Other activiites including unregister, link, unlink, getting_linked, and getting_unlinked, are traced but not profiled.

-- procs : enable `procs_baisc', but also profile the runnablity of processes.

-- ports_basic : only profile basic port activities: open and close.

-- ports : enable ports_basic, but also profile the runnablity of ports.

-- schedulers : enable the profiling of scheduler concurrency.

-- running : enable the feature to distinguish running from runnable process states. If the procs option is not given, this option enables the process concurrency automatically.

-- message : enable the profiling of message passing between processes; This option enables procs_basic automically.

-- migration : enable the profiling of process migration between schedulers; this option enables procs automatically.

-- garbage_collection: enable the profiling of garbage collection. This

-- s_group : enable the profiling of s_group-related activities, including the creation/deletion of s_groups as well adding/removing nodes to/from a s_group.

-- all : enable all the previous options apart from s_group.

-- {callgraph, Mods} : enable the profiling of function activities (call and return_to) of functions defined in Mods. This option enables procs_basic automatically. Given the huge amount of data that could possibly be produced when this feature is on, we do not recommend profiling many modules in one go at this stage. We are in the process of improving the performance of this feature. This feature should not be used when s_group is enabled, since the latter needs to record the actual arguments of function calls.

See the Overview page for examples.

start_webserver/0

start_webserver() -> {started, Hostname, Port} | {error, Reason}

Starts webserver. An available port number will be assigned by inets.

start_webserver/1

start_webserver(Port::integer()) -> {started, Hostname, AssignedPort} | {error, Reason}

Starts webserver with a given port number. If port number is 0, an available port number will be assigned by inets.

stop_db/0

stop_db() -> ok

Stops the percept2 database.

stop_profile/0

stop_profile() -> ok | {error, not_started}

Stops the profiling.

See also: profile/1, profile/2.

stop_webserver/0

stop_webserver() -> ok | {error, not_started}

Stops webserver.

stop_webserver/1

stop_webserver(Port::integer()) -> ok | {error, not_started}

Stops webserver of the given port.


Generated by EDoc, Dec 5 2013, 22:50:07.