Skip to content

Commit

Permalink
Fixes in Rados profiling.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolau-manubens committed Jun 28, 2024
1 parent ef1c8d4 commit 8e1457a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/eckit/io/rados/RadosCluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ RadosIter::~RadosIter() {

//----------------------------------------------------------------------------------------------------------------------

const RadosCluster& RadosCluster::instance() {
RadosCluster& RadosCluster::instance() {
static RadosCluster instance_;
return instance_;
}
Expand Down
2 changes: 1 addition & 1 deletion src/eckit/io/rados/RadosCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class RadosCluster {
void removeAll(const RadosObject&) const;


static const RadosCluster& instance();
static RadosCluster& instance();

// profiling
eckit::RadosIOStats& stats() { return stats_; }
Expand Down
4 changes: 4 additions & 0 deletions src/eckit/io/rados/RadosException.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ namespace eckit {

//----------------------------------------------------------------------------------------------------------------------

RadosException::RadosException() : Exception() {}

RadosException::RadosException(const std::string& w) : Exception(w) {}

RadosException::RadosException(const std::string& w, const eckit::CodeLocation& l) :
Exception(w, l) {}

RadosEntityNotFoundException::RadosEntityNotFoundException() : RadosException() {};

RadosEntityNotFoundException::RadosEntityNotFoundException(const std::string& w) : RadosException(w) {}

RadosEntityNotFoundException::RadosEntityNotFoundException(const std::string& w, const eckit::CodeLocation& l) :
Expand Down
2 changes: 2 additions & 0 deletions src/eckit/io/rados/RadosException.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace eckit {

class RadosException : public eckit::Exception {
public:
RadosException();
RadosException(const std::string&);
RadosException(const std::string&, const eckit::CodeLocation&);
};
Expand All @@ -29,6 +30,7 @@ class RadosException : public eckit::Exception {

class RadosEntityNotFoundException : public RadosException {
public:
RadosEntityNotFoundException();
RadosEntityNotFoundException(const std::string&);
RadosEntityNotFoundException(const std::string&, const eckit::CodeLocation&);
};
Expand Down
4 changes: 2 additions & 2 deletions src/eckit/io/rados/RadosKeyValue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool RadosKeyValue::has(const std::string& key) const {
0 /// @note: flags
)
);
st2.stop(),
st2.stop();

eckit::StatsTimer st3{"rados_kv_has_aio_wait_for_complete", timer, std::bind(&eckit::RadosIOStats::logMdOperation, &stats, _1, _2)};
RADOS_CALL(rados_aio_wait_for_complete(comp.comp_));
Expand Down Expand Up @@ -439,7 +439,7 @@ std::vector<std::string> RadosKeyValue::keys(int keysPerQuery) const {

res.push_back(std::string(key, key + key_len));

st4.start();
st4.start("rados_omap_get_next2", std::bind(&eckit::RadosIOStats::logMdOperation, &stats, _1, _2));
}
st4.stop();

Expand Down

0 comments on commit 8e1457a

Please sign in to comment.