]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added producedSize() method to report total data size put by the producer.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 6 Sep 2010 00:05:09 +0000 (18:05 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 6 Sep 2010 00:05:09 +0000 (18:05 -0600)
It is often very convenient to know this size, but one must be careful not to
use its value for body size, available body size, or exhaustion-calculating
expressions.

No runtime changes expected.

src/BodyPipe.h

index c9e7c93c978a74282ea783c9498d6787c1be5899..cd7dea4f2bb70ac6939a2fe14fb7e3ea38caeeb1 100644 (file)
@@ -99,6 +99,7 @@ public:
     bool bodySizeKnown() const { return theBodySize >= 0; }
     uint64_t bodySize() const;
     uint64_t consumedSize() const { return theGetSize; }
+    uint64_t producedSize() const { return thePutSize; }
     bool productionEnded() const { return !theProducer; }
 
     // called by producers