funcuse

funcuse — Gather function use statistics

Synopsis




            GwyFunctionUse;
GwyFunctionUse* gwy_func_use_new            (void);
void        gwy_func_use_free               (GwyFunctionUse *functions);
void        gwy_func_use_add                (GwyFunctionUse *functions,
                                             const gchar *name);
const gchar* gwy_func_use_get               (GwyFunctionUse *functions,
                                             guint i);
GwyFunctionUse* gwy_func_use_load           (const gchar *filename);
void        gwy_func_use_save               (GwyFunctionUse *functions,
                                             const gchar *filename);
gchar*      gwy_func_use_get_filename       (const gchar *type);
GwyFunctionUse* gwy_app_process_func_get_use
                                            (void);
void        gwy_app_process_func_save_use   (void);

Description

Details

GwyFunctionUse

typedef struct _GwyFunctionUse GwyFunctionUse;


gwy_func_use_new ()

GwyFunctionUse* gwy_func_use_new            (void);

Creates new function use statistics.

Returns : A newly created function use statistics.

gwy_func_use_free ()

void        gwy_func_use_free               (GwyFunctionUse *functions);

Destroys function use statistics, freeing all associated resourced.

functions : Function use statistics.

gwy_func_use_add ()

void        gwy_func_use_add                (GwyFunctionUse *functions,
                                             const gchar *name);

Adds an use of a function to the statistics.

functions : Function use statistics.
name : Function name.

gwy_func_use_get ()

const gchar* gwy_func_use_get               (GwyFunctionUse *functions,
                                             guint i);

Gets the n-th most function from a function statistics.

functions : Function use statistics.
i : Position in the top used functions (starting from 0).
Returns : The function name, or NULL if there are not more functions with use statistics records than i.

gwy_func_use_load ()

GwyFunctionUse* gwy_func_use_load           (const gchar *filename);

Loads function use statistics from a file.

filename : A file name (in GLib encoding).
Returns : A newly created function use statistics filled with data from file filename.

gwy_func_use_save ()

void        gwy_func_use_save               (GwyFunctionUse *functions,
                                             const gchar *filename);

Saves function use statistics data to a file.

functions : Function use statistics.
filename : A file name (in GLib encoding).

gwy_func_use_get_filename ()

gchar*      gwy_func_use_get_filename       (const gchar *type);

Gets the (preferred) name for a file to store function use statistics to.

type : Function type, that is an identifier of the type of statistics gathered. It must be a valid identifier.
Returns : The file name as a newly allocated string.

gwy_app_process_func_get_use ()

GwyFunctionUse* gwy_app_process_func_get_use
                                            (void);

Returns :

gwy_app_process_func_save_use ()

void        gwy_app_process_func_save_use   (void);

Saves application data processing function statistics.