summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagej2c.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-09-08 23:03:56 -0700
committerMerov Linden <merov@lindenlab.com>2010-09-08 23:03:56 -0700
commit39e5d2ecf04deceda92d6a53413298ca1c3bc0c7 (patch)
treece5a8a34f47703f5ee564945b906e9c3f9d684e2 /indra/llimage/llimagej2c.h
parent63f2ddf377fa0fc6a666cdc1001289335d86258b (diff)
VWR-22761 : Rearchitecture of llmetricperformancetester and simple (non complete) implementation in llimagej2c
Diffstat (limited to 'indra/llimage/llimagej2c.h')
-rw-r--r--indra/llimage/llimagej2c.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index cdb3faa207..eeb00de6d2 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -29,8 +29,11 @@
#include "llimage.h"
#include "llassettype.h"
+#include "llmetricperformancetester.h"
class LLImageJ2CImpl;
+class LLImageCompressionTester ;
+
class LLImageJ2C : public LLImageFormatted
{
protected:
@@ -72,6 +75,9 @@ public:
static void openDSO();
static void closeDSO();
static std::string getEngineInfo();
+
+ // Image compression/decompression tester
+ static LLImageCompressionTester* sTesterp ;
protected:
friend class LLImageJ2CImpl;
@@ -118,4 +124,38 @@ protected:
#define LINDEN_J2C_COMMENT_PREFIX "LL_"
+//
+// This class is used for performance data gathering only.
+// Tracks the image compression / decompression data,
+// records and outputs them to metric log files.
+//
+
+class LLImageCompressionTester : public LLMetricPerformanceTesterBasic
+{
+ public:
+ LLImageCompressionTester();
+ ~LLImageCompressionTester();
+
+ void updateDecompressionStats(const S32 bytesIn, const S32 bytesOut, const F32 deltaTime) ;
+ void updateCompressionStats(const S32 bytesIn, const S32 bytesOut, const F32 deltaTime) ;
+
+ protected:
+ /*virtual*/ void outputTestRecord(LLSD* sd);
+
+ private:
+ //
+ // Data size
+ //
+ U32 mTotalBytesInDecompression; // Total bytes fed to decompressor
+ U32 mTotalBytesOutDecompression; // Total bytes produced by decompressor
+ U32 mTotalBytesInCompression; // Total bytes fed to compressor
+ U32 mTotalBytesOutCompression; // Total bytes produced by compressor
+
+ //
+ // Time
+ //
+ F32 mTotalTimeDecompression; // Total time spent in computing decompression
+ F32 mTotalTimeCompression; // Total time spent in computing compression
+ };
+
#endif