From 39e5d2ecf04deceda92d6a53413298ca1c3bc0c7 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 8 Sep 2010 23:03:56 -0700 Subject: VWR-22761 : Rearchitecture of llmetricperformancetester and simple (non complete) implementation in llimagej2c --- indra/llimage/llimagej2c.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'indra/llimage/llimagej2c.h') 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 -- cgit v1.2.3 From 88e33d00cd189aec6ef9b5aa481d4d9a2777b1fb Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 17 Sep 2010 19:17:12 -0700 Subject: STORM-105 : Add compression data gathering, took partial decompression into account in stats --- indra/llimage/llimagej2c.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llimage/llimagej2c.h') diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index eeb00de6d2..adbfb9cdb3 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -127,18 +127,19 @@ protected: // // This class is used for performance data gathering only. // Tracks the image compression / decompression data, -// records and outputs them to metric log files. +// records and outputs them to metric.slp 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) ; - + void updateDecompressionStats(const F32 deltaTime) ; + void updateDecompressionStats(const S32 bytesIn, const S32 bytesOut) ; + void updateCompressionStats(const F32 deltaTime) ; + void updateCompressionStats(const S32 bytesIn, const S32 bytesOut) ; + protected: /*virtual*/ void outputTestRecord(LLSD* sd); @@ -150,7 +151,6 @@ class LLImageCompressionTester : public LLMetricPerformanceTesterBasic U32 mTotalBytesOutDecompression; // Total bytes produced by decompressor U32 mTotalBytesInCompression; // Total bytes fed to compressor U32 mTotalBytesOutCompression; // Total bytes produced by compressor - // // Time // -- cgit v1.2.3 From 40979589afc5c91cab977307a1e400315b1c8a8f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 27 Oct 2010 23:15:22 -0700 Subject: STORM-105 : improve decompression perf gathering, allow perf name to be passed on the command line, fix crash in analysis phase --- indra/llimage/llimagej2c.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llimage/llimagej2c.h') diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index adbfb9cdb3..3933c9236f 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -127,7 +127,7 @@ protected: // // This class is used for performance data gathering only. // Tracks the image compression / decompression data, -// records and outputs them to metric.slp log files. +// records and outputs them to the log file. // class LLImageCompressionTester : public LLMetricPerformanceTesterBasic { @@ -151,6 +151,8 @@ class LLImageCompressionTester : public LLMetricPerformanceTesterBasic U32 mTotalBytesOutDecompression; // Total bytes produced by decompressor U32 mTotalBytesInCompression; // Total bytes fed to compressor U32 mTotalBytesOutCompression; // Total bytes produced by compressor + U32 mRunBytesInDecompression; // Bytes fed to decompressor in this run + U32 mRunBytesInCompression; // Bytes fed to compressor in this run // // Time // -- cgit v1.2.3 From dac53830f1a67c8657ced9c39eccedbadf149bd9 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 27 Oct 2010 23:40:35 -0700 Subject: STORM-104 : make kdu statically linked, suppress the need for llkdu --- indra/llimage/llimagej2c.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llimage/llimagej2c.h') diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index adbfb9cdb3..9191d7886a 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -72,8 +72,6 @@ public: static S32 calcHeaderSizeJ2C(); static S32 calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate = 0.f); - static void openDSO(); - static void closeDSO(); static std::string getEngineInfo(); // Image compression/decompression tester -- cgit v1.2.3 From 85509457c6dc6a0f3e56fa3d24ae872e1878c04f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 5 Nov 2010 18:40:08 -0700 Subject: STORM-105 : Take Vadim code review into account, code clean up --- indra/llimage/llimagej2c.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llimage/llimagej2c.h') diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index 3933c9236f..7333f0370f 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -76,13 +76,11 @@ public: static void closeDSO(); static std::string getEngineInfo(); - // Image compression/decompression tester - static LLImageCompressionTester* sTesterp ; - protected: friend class LLImageJ2CImpl; friend class LLImageJ2COJ; friend class LLImageJ2CKDU; + friend class LLImageCompressionTester; void decodeFailed(); void updateRawDiscardLevel(); @@ -96,6 +94,10 @@ protected: BOOL mReversible; LLImageJ2CImpl *mImpl; std::string mLastError; + + // Image compression/decompression tester + static LLImageCompressionTester* sTesterp; + static bool perfStatsEnabled(); }; // Derive from this class to implement JPEG2000 decoding -- cgit v1.2.3 From b5df1d2abcef04ee5f491a7414189f4e82faaa1e Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 8 Nov 2010 17:16:31 -0800 Subject: STORM-105 : takes Vadim's comments into account, clean up use of static globals and magic strings, enforce naming conventions --- indra/llimage/llimagej2c.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llimage/llimagej2c.h') diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index 7333f0370f..cc3dabd7d8 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -97,7 +97,6 @@ protected: // Image compression/decompression tester static LLImageCompressionTester* sTesterp; - static bool perfStatsEnabled(); }; // Derive from this class to implement JPEG2000 decoding -- cgit v1.2.3