Logo
Explore Privacy Policy Terms of Service Help
Sign In
ahuston-0/hydra
1
0
Fork 0
You've already forked hydra
Code Issues Pull Requests 1 Packages Projects Releases Wiki Activity
hydra/src/hydra-queue-runner/counter.hh

18 lines
356 B
C++
Raw Normal View History

Keep track of the number of build steps that are being built (As opposed to being in the closure copying stage.)
2015-06-22 11:23:00 +02:00
#pragma once
#include <atomic>
Warn if PostgreSQL appears stalled
2016-02-29 15:10:30 +01:00
#include <functional>
Keep track of the number of build steps that are being built (As opposed to being in the closure copying stage.)
2015-06-22 11:23:00 +02:00
Moar stats
2015-06-25 16:46:59 +02:00
typedef std::atomic<unsigned long> counter;
Keep track of the number of build steps that are being built (As opposed to being in the closure copying stage.)
2015-06-22 11:23:00 +02:00
struct MaintainCount
{
counter & c;
MaintainCount(counter & c) : c(c) { c++; }
Warn if PostgreSQL appears stalled
2016-02-29 15:10:30 +01:00
MaintainCount(counter & c, std::function<void(unsigned long)> warn) : c(c)
{
warn(++c);
}
Keep stats for the Hydra auto scaler "hydra-queue-runner --status" now prints how many runnable and running build steps exist for each machine type. This allows additional machines to be provisioned based on the Hydra load.
2015-08-17 13:50:41 +02:00
~MaintainCount() { auto prev = c--; assert(prev); }
Keep track of the number of build steps that are being built (As opposed to being in the closure copying stage.)
2015-06-22 11:23:00 +02:00
};
Reference in New Issue Copy Permalink
Powered by Gitea Page: 58ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API