forked from organicmaps/organicmaps
Removed unused base/profiler. Should it be in base?
This commit is contained in:
parent
4747f5ccda
commit
3b51b1c8cd
7 changed files with 2 additions and 105 deletions
|
@ -14,7 +14,6 @@ SOURCES += \
|
|||
logging.cpp \
|
||||
thread.cpp \
|
||||
string_utils.cpp \
|
||||
profiler.cpp \
|
||||
commands_queue.cpp \
|
||||
shared_buffer_manager.cpp \
|
||||
memory_mapped_file.cpp \
|
||||
|
@ -25,7 +24,7 @@ SOURCES += \
|
|||
timer.cpp \
|
||||
internal/message.cpp \
|
||||
exception.cpp \
|
||||
threaded_container.cpp
|
||||
threaded_container.cpp \
|
||||
|
||||
HEADERS += \
|
||||
SRC_FIRST.hpp \
|
||||
|
@ -56,7 +55,6 @@ HEADERS += \
|
|||
stl_add.hpp \
|
||||
timer.hpp \
|
||||
cache.hpp \
|
||||
profiler.hpp \
|
||||
matrix.hpp \
|
||||
set_operations.hpp \
|
||||
condition.hpp \
|
||||
|
@ -69,4 +67,4 @@ HEADERS += \
|
|||
runner.hpp \
|
||||
mru_cache.hpp \
|
||||
threaded_container.hpp \
|
||||
threaded_list.hpp
|
||||
threaded_list.hpp \
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#include "profiler.hpp"
|
||||
|
||||
#include "timer.hpp"
|
||||
|
||||
namespace prof
|
||||
{
|
||||
my::Timer timer;
|
||||
|
||||
double * metrics()
|
||||
{
|
||||
static double data[2 * (metrics_array_size - 1)];
|
||||
return data;
|
||||
}
|
||||
|
||||
double timer_elapsed()
|
||||
{
|
||||
return timer.ElapsedSeconds();
|
||||
}
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
//#define PROFILER_COMMON
|
||||
//#define PROFILER_DRAWING
|
||||
//#define PROFILER_YG
|
||||
|
||||
#define LPROF LINFO
|
||||
|
||||
namespace prof
|
||||
{
|
||||
enum metric_name
|
||||
{
|
||||
metrics_array_start = 0,
|
||||
/// here custom metrics begin.
|
||||
|
||||
for_each_feature,
|
||||
feature_count,
|
||||
do_draw,
|
||||
|
||||
yg_upload_data,
|
||||
yg_draw_path,
|
||||
yg_draw_path_count,
|
||||
yg_draw_path_body,
|
||||
yg_draw_path_join,
|
||||
yg_flush,
|
||||
|
||||
/// here custom metrics ends.
|
||||
metrics_array_size
|
||||
};
|
||||
|
||||
double * metrics();
|
||||
|
||||
double timer_elapsed();
|
||||
|
||||
template <metric_name name>
|
||||
void counter()
|
||||
{
|
||||
metrics()[(name - 1) * 2 + 1] += 1;
|
||||
}
|
||||
|
||||
template <metric_name name>
|
||||
inline void start()
|
||||
{
|
||||
metrics()[(name - 1) * 2] = timer_elapsed();
|
||||
};
|
||||
|
||||
template <metric_name name>
|
||||
inline void end()
|
||||
{
|
||||
metrics()[(name - 1) * 2] = timer_elapsed() - metrics()[(name - 1) * 2];
|
||||
metrics()[(name - 1) * 2 + 1] += metrics()[(name - 1) * 2];
|
||||
}
|
||||
|
||||
template <metric_name name>
|
||||
inline void reset()
|
||||
{
|
||||
metrics()[(name - 1) * 2 + 1] = 0;
|
||||
}
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
for (unsigned i = 0; i < metrics_array_size - 1; ++i)
|
||||
metrics()[i * 2 + 1] = 0;
|
||||
}
|
||||
|
||||
template <metric_name name>
|
||||
double metric()
|
||||
{
|
||||
return metrics()[(name - 1) * 2 + 1];
|
||||
}
|
||||
|
||||
template <metric_name name>
|
||||
struct block
|
||||
{
|
||||
block() {start<name>();}
|
||||
~block() {end<name>();}
|
||||
};
|
||||
}
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "../geometry/screenbase.hpp"
|
||||
|
||||
#include "../base/profiler.hpp"
|
||||
#include "../base/logging.hpp"
|
||||
#include "../base/buffer_vector.hpp"
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "../geometry/screenbase.hpp"
|
||||
|
||||
#include "../base/logging.hpp"
|
||||
#include "../base/profiler.hpp"
|
||||
#include "../base/mutex.hpp"
|
||||
#include "../base/timer.hpp"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "../geometry/rect2d.hpp"
|
||||
|
||||
#include "../base/assert.hpp"
|
||||
#include "../base/profiler.hpp"
|
||||
#include "../base/math.hpp"
|
||||
#include "../base/mutex.hpp"
|
||||
#include "../base/logging.hpp"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "../platform/platform.hpp"
|
||||
|
||||
#include "../base/logging.hpp"
|
||||
#include "../base/profiler.hpp"
|
||||
|
||||
#include "../std/iterator.hpp"
|
||||
#include "../std/bind.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue