aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Foundation/src/HashStatistic.cpp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/Foundation/src/HashStatistic.cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/Foundation/src/HashStatistic.cpp')
-rw-r--r--contrib/libs/poco/Foundation/src/HashStatistic.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/contrib/libs/poco/Foundation/src/HashStatistic.cpp b/contrib/libs/poco/Foundation/src/HashStatistic.cpp
index a7adca3ba1..52f618d7aa 100644
--- a/contrib/libs/poco/Foundation/src/HashStatistic.cpp
+++ b/contrib/libs/poco/Foundation/src/HashStatistic.cpp
@@ -1,64 +1,64 @@
-//
-// HashStatistic.cpp
-//
-// Library: Foundation
-// Package: Hashing
-// Module: HashStatistic
-//
-// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
-// and Contributors.
-//
-// SPDX-License-Identifier: BSL-1.0
-//
-
-
-#include "Poco/HashStatistic.h"
-#include <sstream>
-
-namespace Poco {
-
-
-HashStatistic::HashStatistic(
- UInt32 tableSize,
- UInt32 numEntries,
- UInt32 numZeroEntries,
- UInt32 maxEntry,
- std::vector<UInt32> details):
- _sizeOfTable(tableSize),
- _numberOfEntries(numEntries),
- _numZeroEntries(numZeroEntries),
- _maxEntriesPerHash(maxEntry),
- _detailedEntriesPerHash(details)
-{
-}
-
-
-HashStatistic::~HashStatistic()
-{
-}
-
-
-std::string HashStatistic::toString() const
-{
- std::ostringstream str;
- str << "HashTable of size " << _sizeOfTable << " containing " << _numberOfEntries << " entries:\n";
- str << " NumberOfZeroEntries: " << _numZeroEntries << "\n";
- str << " MaxEntry: " << _maxEntriesPerHash << "\n";
- str << " AvgEntry: " << avgEntriesPerHash() << ", excl Zero slots: " << avgEntriesPerHashExclZeroEntries() << "\n";
- str << " DetailedStatistics: \n";
- for (int i = 0; i < _detailedEntriesPerHash.size(); ++i)
- {
- // 10 entries per line
- if (i % 10 == 0)
- {
- str << "\n " << i << ":";
- }
- str << " " << _detailedEntriesPerHash[i];
- }
- str << "\n";
- str.flush();
- return str.str();
-}
-
-
-} // namespace Poco
+//
+// HashStatistic.cpp
+//
+// Library: Foundation
+// Package: Hashing
+// Module: HashStatistic
+//
+// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// SPDX-License-Identifier: BSL-1.0
+//
+
+
+#include "Poco/HashStatistic.h"
+#include <sstream>
+
+namespace Poco {
+
+
+HashStatistic::HashStatistic(
+ UInt32 tableSize,
+ UInt32 numEntries,
+ UInt32 numZeroEntries,
+ UInt32 maxEntry,
+ std::vector<UInt32> details):
+ _sizeOfTable(tableSize),
+ _numberOfEntries(numEntries),
+ _numZeroEntries(numZeroEntries),
+ _maxEntriesPerHash(maxEntry),
+ _detailedEntriesPerHash(details)
+{
+}
+
+
+HashStatistic::~HashStatistic()
+{
+}
+
+
+std::string HashStatistic::toString() const
+{
+ std::ostringstream str;
+ str << "HashTable of size " << _sizeOfTable << " containing " << _numberOfEntries << " entries:\n";
+ str << " NumberOfZeroEntries: " << _numZeroEntries << "\n";
+ str << " MaxEntry: " << _maxEntriesPerHash << "\n";
+ str << " AvgEntry: " << avgEntriesPerHash() << ", excl Zero slots: " << avgEntriesPerHashExclZeroEntries() << "\n";
+ str << " DetailedStatistics: \n";
+ for (int i = 0; i < _detailedEntriesPerHash.size(); ++i)
+ {
+ // 10 entries per line
+ if (i % 10 == 0)
+ {
+ str << "\n " << i << ":";
+ }
+ str << " " << _detailedEntriesPerHash[i];
+ }
+ str << "\n";
+ str.flush();
+ return str.str();
+}
+
+
+} // namespace Poco