--- a/src/RecfileHandler.h Sat Dec 04 21:14:52 2021 +0100
+++ b/src/RecfileHandler.h Sat Sep 10 19:27:47 2022 +0200
@@ -84,12 +84,20 @@
output << std::endl;
}
+ void writeRecordCount() {
+ if (attributeCount) {
+ output << std::endl << "# Record count: " << (valueCount / attributeCount) << std::endl;
+ }
+ }
+
public:
RecfileHandler(std::ostream& output) : output(output) {
}
void startRelation(string_t name, std::vector<handlers::AttributeMetadata> attributes) override {
+ writeRecordCount();
+
valueCount = 0;
attributeCount = 0;
@@ -118,6 +126,7 @@
}
void endOfPipe() {
+ writeRecordCount();
if (valueCount) writeSeparator();
}