screpl.bridge_server.blocks.profile module

Defines ProfileBlock

class screpl.bridge_server.blocks.profile. ProfileBlock ( region ) [source]

Bases: screpl.bridge_server.block.BridgeBlock

Provides profiled results

struct VariableEntry {
    int name_offset; // relative offset to ProfileBlock address
    int counter;
    int total_ms;
    int total_ticks;
};

struct ProfileBlock {
    int var_count;
    VariableEntry var_entries[var_count];
    char var_names[var_count]; // null-ended strings
};
get_buffer_size ( ) [source]

Returns size of its contents.

Required to be overridden.

signature = b'PROF'
update_content ( ) [source]

Updates contents of the block.

Use self as a pointer to contents of the block. Required to be overridden.

write_payload ( emitbuffer ) [source]

Fills payload buffer

screpl.bridge_server.blocks.profile. get_block ( ) [source]