2023-12-21 23:23:49 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_RESOURCE_CACHESATS
|
|
|
|
#define OPENMW_COMPONENTS_RESOURCE_CACHESATS
|
|
|
|
|
|
|
|
#include <cstddef>
|
2024-09-14 12:04:45 +00:00
|
|
|
#include <string>
|
2023-12-21 23:23:49 +00:00
|
|
|
#include <string_view>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class Stats;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Resource
|
|
|
|
{
|
|
|
|
struct CacheStats
|
|
|
|
{
|
|
|
|
std::size_t mSize = 0;
|
|
|
|
std::size_t mGet = 0;
|
|
|
|
std::size_t mHit = 0;
|
|
|
|
std::size_t mExpired = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
void addCacheStatsAttibutes(std::string_view prefix, std::vector<std::string>& out);
|
|
|
|
|
|
|
|
void reportStats(std::string_view prefix, unsigned frameNumber, const CacheStats& src, osg::Stats& dst);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|