|
FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "cmdline/cmdline.h"#include "globalincs/pstypes.h"#include "globalincs/systemvars.h"#include "io/timer.h"#include <fstream>Go to the source code of this file.
Functions | |
| void | profile_init () |
| Called once at engine initialization to set the timer. More... | |
| void | profile_deinit () |
| void | profile_begin (const char *name) |
| void | profile_end (const char *name) |
| void | profile_dump_output () |
| void | store_profile_in_history (SCP_string &name, float percent, uint time) |
| void | get_profile_from_history (SCP_string &name, float *avg, float *min, float *max, uint *avg_micro_sec, uint *min_micro_sec, uint *max_micro_sec) |
Variables | |
| SCP_vector< profile_sample > | samples |
| SCP_vector< profile_sample_history > | history |
| uint | start_profile_time = 0 |
| uint | end_profile_time = 0 |
| SCP_string | profile_output |
| std::ofstream | profiling_file |
| void get_profile_from_history | ( | SCP_string & | name, |
| float * | avg, | ||
| float * | min, | ||
| float * | max, | ||
| uint * | avg_micro_sec, | ||
| uint * | min_micro_sec, | ||
| uint * | max_micro_sec | ||
| ) |
Gets the min, max and average values for a given profile
| name | The globally unique name for this profile (see profile_begin()/profile_end()) |
| avg | Pointer to a float in which the average value will be stored (or 0.0 if no value has been saved) |
| min | Pointer to a float in which the minimum value will be stored (or 0.0 if no value has been saved) |
| max | Pointer to a float in which the maximum value will be stored (or 0.0 if no value has been saved) |
Definition at line 326 of file profiling.cpp.
| void profile_begin | ( | const char * | name | ) |
Used to start profiling a section of code. A section started by profile_begin needs to be closed off by calling profile_end with the same argument.
| name | A globally unique string that will be displayed in the HUD readout |
Definition at line 80 of file profiling.cpp.
| void profile_deinit | ( | ) |
Definition at line 63 of file profiling.cpp.
| void profile_dump_output | ( | ) |
Builds the output text.
Definition at line 196 of file profiling.cpp.
| void profile_end | ( | const char * | name | ) |
Used to end profiling of a section of code. Note that the parameter given MUST match that of the preceding call to profile_begin
| name | A globally unique string that will be displayed in the HUD readout |
Definition at line 130 of file profiling.cpp.
| void profile_init | ( | ) |
Called once at engine initialization to set the timer.
Definition at line 48 of file profiling.cpp.
| void store_profile_in_history | ( | SCP_string & | name, |
| float | percent, | ||
| uint | time | ||
| ) |
Stores profile data in in the profile history lookup. This is used internally by the profiling code and should not be called outside of it.
| name | The globally unique name for this profile (see profile_begin()/profile_end()) |
| percent | How much time the profiled section took to execute (as a percentage of overall frametime) |
Definition at line 263 of file profiling.cpp.
| uint end_profile_time = 0 |
Definition at line 40 of file profiling.cpp.
| SCP_vector<profile_sample_history> history |
Definition at line 37 of file profiling.cpp.
| SCP_string profile_output |
Definition at line 42 of file profiling.cpp.
| std::ofstream profiling_file |
Definition at line 43 of file profiling.cpp.
Definition at line 36 of file profiling.cpp.
| uint start_profile_time = 0 |
Definition at line 39 of file profiling.cpp.