Commit fd57f456 authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Show timestamps when ParanoidManifestChecker reports an error

parent 2fdce764
Pipeline #1492364 failed with stages
in 98 minutes and 58 seconds
...@@ -54,6 +54,10 @@ bool operator<(struct timespec &one, struct timespec &two) { ...@@ -54,6 +54,10 @@ bool operator<(struct timespec &one, struct timespec &two) {
return one.tv_sec < two.tv_sec; return one.tv_sec < two.tv_sec;
} }
std::string timespecToString(struct timespec &spec) {
return SSTR(spec.tv_sec << "." << spec.tv_nsec);
}
Status ParanoidManifestChecker::checkDB(std::string_view path) { Status ParanoidManifestChecker::checkDB(std::string_view path) {
DirectoryIterator iter(path); DirectoryIterator iter(path);
struct dirent* entry = nullptr; struct dirent* entry = nullptr;
...@@ -76,7 +80,7 @@ Status ParanoidManifestChecker::checkDB(std::string_view path) { ...@@ -76,7 +80,7 @@ Status ParanoidManifestChecker::checkDB(std::string_view path) {
} }
int secDiff = sstMtime.tv_sec - manifestMtime.tv_sec; int secDiff = sstMtime.tv_sec - manifestMtime.tv_sec;
std::string diff = SSTR(secDiff << " sec"); std::string diff = SSTR(secDiff << " sec, " << timespecToString(sstMtime) << " vs " << timespecToString(manifestMtime));
// 1 hour should be more than enough (?) // 1 hour should be more than enough (?)
if(secDiff >= 3600) { if(secDiff >= 3600) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment