Keep track of wait time per system type
I.e., how much time the currently runnable steps per system type have been waiting. This is useful for deciding whether to provision more machines.
This commit is contained in:
@@ -175,6 +175,9 @@ struct Step
|
||||
|
||||
/* The lowest ID of any build depending on this step. */
|
||||
BuildID lowestBuildID{std::numeric_limits<BuildID>::max()};
|
||||
|
||||
/* The time at which this step became runnable. */
|
||||
system_time runnableSince;
|
||||
};
|
||||
|
||||
std::atomic_bool finished{false}; // debugging
|
||||
@@ -324,7 +327,8 @@ private:
|
||||
struct MachineType
|
||||
{
|
||||
unsigned int runnable{0}, running{0};
|
||||
time_t lastActive{0};
|
||||
system_time lastActive;
|
||||
std::chrono::seconds waitTime; // time runnable steps have been waiting
|
||||
};
|
||||
|
||||
Sync<std::map<std::string, MachineType>> machineTypes;
|
||||
@@ -339,6 +343,8 @@ private:
|
||||
~MachineReservation();
|
||||
};
|
||||
|
||||
std::atomic<time_t> lastDispatcherCheck{0};
|
||||
|
||||
public:
|
||||
State();
|
||||
|
||||
|
Reference in New Issue
Block a user