@mark1russell7/harness 0.16.21 → 0.16.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{cell-CgjwfQQ-.d.ts → cell-CsI4nPck.d.ts} +49 -1
- package/build/{image-Dzofp1ab.js → image-B1jai9Lq.js} +17 -6
- package/build/image-B1jai9Lq.js.map +1 -0
- package/build/index.d.ts +21 -2
- package/build/index.js +82 -8
- package/build/index.js.map +1 -1
- package/build/layers.d.ts +1 -1
- package/build/schema.d.ts +1 -1
- package/build/schema.js +1 -1
- package/package.json +1 -1
- package/build/image-Dzofp1ab.js.map +0 -1
|
@@ -156,6 +156,11 @@ interface HostLimits {
|
|
|
156
156
|
/** This amount is the limit of the memory and the swap together, in bytes. It is equal to `Memory`, thus the container has no swap. */
|
|
157
157
|
MemorySwap?: number;
|
|
158
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* This function gives the numbers of the CPUs of a list, as `cpuset.cpus` takes it: `0`, `2-3` or `0,2`.
|
|
161
|
+
* The numbers are in order, each one time. A text that is not a list gives null.
|
|
162
|
+
*/
|
|
163
|
+
declare const cpusOfList: (text: string) => readonly number[] | null;
|
|
159
164
|
/** This function gives the problems of the limits of a container, each as a sentence. Limits with no problem give an empty list. */
|
|
160
165
|
declare const limitsProblems: (limits: ContainerLimits) => string[];
|
|
161
166
|
/**
|
|
@@ -1453,6 +1458,44 @@ interface Target {
|
|
|
1453
1458
|
*/
|
|
1454
1459
|
readonly limits?: ContainerLimits;
|
|
1455
1460
|
}
|
|
1461
|
+
/**
|
|
1462
|
+
* The CPU shares of a set of CPUs are the shares of each state of its CPU time between two readings of
|
|
1463
|
+
* `/proc/stat` (`cpuShares`). Each share goes from 0 to 1, and the sum of the eight states is 1.
|
|
1464
|
+
*/
|
|
1465
|
+
interface CpuShares {
|
|
1466
|
+
/** This list is the CPUs of the set, as `cpuset.cpus` takes it, for example `0` or `1-3`. */
|
|
1467
|
+
readonly cpus: string;
|
|
1468
|
+
/** This count is the number of CPUs in the set. */
|
|
1469
|
+
readonly count: number;
|
|
1470
|
+
/** This count is the busy cores of the set: the count times the share of the states that are not `idle` or `iowait`. */
|
|
1471
|
+
readonly busy: number;
|
|
1472
|
+
/** This share is the time of processes in user mode, with the time of guests. */
|
|
1473
|
+
readonly user: number;
|
|
1474
|
+
/** This share is the time of processes with a low priority in user mode. */
|
|
1475
|
+
readonly nice: number;
|
|
1476
|
+
/** This share is the time of processes in kernel mode. */
|
|
1477
|
+
readonly system: number;
|
|
1478
|
+
/** This share is the time with no work. */
|
|
1479
|
+
readonly idle: number;
|
|
1480
|
+
/** This share is the time with no work while a read or a write of a disk waited. */
|
|
1481
|
+
readonly iowait: number;
|
|
1482
|
+
/** This share is the time of hardware interrupts. */
|
|
1483
|
+
readonly irq: number;
|
|
1484
|
+
/** This share is the time of software interrupts, for example the packets of the network. */
|
|
1485
|
+
readonly softirq: number;
|
|
1486
|
+
/** This share is the time that the host gave to another guest while this one had work. */
|
|
1487
|
+
readonly steal: number;
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* The run CPUs are the CPU shares of the CPU set of the target and of the client in one run. The time of
|
|
1491
|
+
* a CPU outside the cgroup of its container is in them too, for example `softirq` and other processes.
|
|
1492
|
+
*/
|
|
1493
|
+
interface RunCpus {
|
|
1494
|
+
/** These are the shares of the CPUs of `Target.limits.cpuset`. */
|
|
1495
|
+
readonly target?: CpuShares;
|
|
1496
|
+
/** These are the shares of the CPUs of `Cell.clientLimits.cpuset`. */
|
|
1497
|
+
readonly client?: CpuShares;
|
|
1498
|
+
}
|
|
1456
1499
|
/**
|
|
1457
1500
|
* These are the limits of one container of a lab, as Docker writes them into the cgroup of the
|
|
1458
1501
|
* container. A measurement of the cost of a server gives the server a CPU limit and a memory
|
|
@@ -1982,6 +2025,11 @@ interface Run {
|
|
|
1982
2025
|
* writes it with its first cell on layer E4.
|
|
1983
2026
|
*/
|
|
1984
2027
|
readonly steal?: number;
|
|
2028
|
+
/**
|
|
2029
|
+
* These are the CPU shares of the CPUs of the target and of the client in the run, from `/proc/stat`
|
|
2030
|
+
* (`cpuShares`). A run of a plain cell writes the shares of each container with a `cpuset`.
|
|
2031
|
+
*/
|
|
2032
|
+
readonly cpus?: RunCpus;
|
|
1985
2033
|
/** These are the addresses and the namespaces of a topology, which the measurement of a run reads. */
|
|
1986
2034
|
readonly topology?: RunTopology;
|
|
1987
2035
|
/** These are the lines of the routers of a topology from the start to the end of the run. */
|
|
@@ -2144,4 +2192,4 @@ interface RunTopology {
|
|
|
2144
2192
|
};
|
|
2145
2193
|
}>>;
|
|
2146
2194
|
}
|
|
2147
|
-
export {
|
|
2195
|
+
export { MemoryStep as $, latestEndOf as $t, Hop as A, RunCpus as At, KafkaPause as B, SentinelEvent as Bt, FabricManifest as C, resourceArgs as Cn, ReplicaSetStage as Ct, GroupPlace as D, RttRange as Dt, Group as E, resourceReadingOf as En, RouterHop as Et, HostSysctl as F, RunPause as Ft, LoadConnections as G, StageBand as Gt, LineCount as H, Shipped as Ht, HttpProbe as I, RunResources as It, LoadStream as J, Topology as Jt, LoadPlan as K, Subject as Kt, ImageSource as L, RunRoute as Lt, HopPlace as M, RunFabric as Mt, HopSignal as N, RunGroup as Nt, GroupPrediction as O, Run as Ot, HopWrite as P, RunPart as Pt, MemoryPrediction as Q, isHopPlace as Qt, Jitter as R, RunStream as Rt, Fabric as S, networkOf as Sn, ReplicaSet as St, FaultPlace as T, resourceReadingIn as Tn, RequestPrediction as Tt, LineMatch as U, ShippedImage as Ut, KernelRecord as V, SentinelStage as Vt, LoadBand as W, Stage as Wt, MemoryOomPrediction as X, WsProbe as Xt, MemoryLimits as Y, Toxic as Yt, MemoryOomTask as Z, environmentProblems as Zt, DriverBand as _, cpuStatOf as _n, QueueEnd as _t, ClientCapability as a, ResourceDevice as an, Outcomes as at, EgressPacketLaw as b, limitsProblems as bn, Recovers as bt, ClusterClientAt as c, ResourceNetwork as cn, PausePrediction as ct, ContainerLimits as d, ResourceReading as dn, Prediction as dt, HostLimits as en, MemoryThrottlePrediction as et, CountBand as f, ResourceTraffic as fn, ProbeEvent as ft, DrillRoom as g, cpuMaxOf as gn, QueueConnection as gt, Drill as h, cgroupNumber as hn, QueueBand as ht, Client as i, ResourceCpu as in, Observer as it, HopEvent as j, RunDrill as jt, GroupRole as k, RunBackup as kt, ClusterStage as l, ResourceOptions as ln, PinnedImage as lt, DeliveryPrediction as m, cgroupLimit as mn, ProxyTime as mt, CLIENT_CAPABILITIES as n, RESOURCES_PROGRAM as nn, MiddleboxExpectation as nt, ClientImage as o, ResourceLimits as on, Pair as ot, CpuShares as p, cgroupKeyed as pn, ProxyHop as pt, LoadPrediction as q, Target as qt, Cell as r, ResourceChange as rn, MiddleboxForm as rt, Cluster as s, ResourceMemory as sn, PauseBand as st, BuildImage as t, RESOURCES_EVENT as tn, MiddleboxEvent as tt, ConntrackPrediction as u, ResourceReader as un, PortsPrediction as ut, DriverStep as v, cpusOfList as vn, QueuePrediction as vt, Fault as w, resourceChange as wn, Replies as wt, EgressPrediction as x, memoryStatOf as xn, Reference as xt, EgressBurst as y, hostLimitsOf as yn, Reconnects as yt, Kafka as z, RunTopology as zt };
|
|
@@ -388,11 +388,22 @@ const bytesOf = (memory) => {
|
|
|
388
388
|
return null;
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
+
/**
|
|
392
|
+
* This function gives the numbers of the CPUs of a list, as `cpuset.cpus` takes it: `0`, `2-3` or `0,2`.
|
|
393
|
+
* The numbers are in order, each one time. A text that is not a list gives null.
|
|
394
|
+
*/
|
|
395
|
+
const cpusOfList = (text) => {
|
|
396
|
+
if (!/^\d+(-\d+)?(,\d+(-\d+)?)*$/.test(text)) return null;
|
|
397
|
+
const cpus = /* @__PURE__ */ new Set();
|
|
398
|
+
for (const range of text.split(",")) {
|
|
399
|
+
const [first, last = first] = range.split("-").map(Number);
|
|
400
|
+
if (first > last) return null;
|
|
401
|
+
for (let cpu = first; cpu <= last; cpu += 1) cpus.add(cpu);
|
|
402
|
+
}
|
|
403
|
+
return [...cpus].sort((a, b) => a - b);
|
|
404
|
+
};
|
|
391
405
|
/** This function tells that a text is a list of CPUs, as `cpuset.cpus` takes it: `0`, `2-3` or `0,2`. */
|
|
392
|
-
const isCpuList = (text) =>
|
|
393
|
-
const [first, last] = range.split("-").map(Number);
|
|
394
|
-
return last === void 0 || first <= last;
|
|
395
|
-
});
|
|
406
|
+
const isCpuList = (text) => cpusOfList(text) !== null;
|
|
396
407
|
/** This function gives the problems of the limits of a container, each as a sentence. Limits with no problem give an empty list. */
|
|
397
408
|
const limitsProblems = (limits) => {
|
|
398
409
|
const problems = [];
|
|
@@ -1451,6 +1462,6 @@ const grpcClientImage = () => imageOf(shipped("grpc"));
|
|
|
1451
1462
|
const targetSourceOf = (target) => target.subject ?? target.image;
|
|
1452
1463
|
/** This function gives the image that a target operates: the image of its subject, or its stock image. */
|
|
1453
1464
|
const targetImageOf = (target) => imageOf(targetSourceOf(target));
|
|
1454
|
-
export {
|
|
1465
|
+
export { cpusOfList as $, targetSourceOf as A, versionsOf as B, programOf as C, subjectClient as D, sources as E, goVersions as F, requestFirst as G, environmentProblems as H, jarVersions as I, cgroupKeyed as J, RESOURCES_EVENT as K, locksOf as L, unpinnedBases as M, LOCK_NAMES as N, subjectProblems as O, cargoVersions as P, cpuStatOf as Q, npmDrift as R, planOf as S, shippedSource as T, isHopPlace as U, CLIENT_CAPABILITIES as V, latestEndOf as W, cgroupNumber as X, cgroupLimit as Y, cpuMaxOf as Z, kafkaClientImage as _, loadOf as _t, SHIPPED_NAMES as a, resourceChange as at, nodeHttpImage as b, poolOf as bt, buildRecordOf as c, CLOSED_TOLERANCE as ct, harnessImage as d, LOAD_POOL_LIMIT as dt, hostLimitsOf as et, harnessVersion as f, SCHEDULE_PATH as ft, inContext as g, loadEnds as gt, imageProblems as h, estimateVerdict as ht, SHIPPED_CLIENTS as i, resourceArgs as it, unlockedManifests as j, targetImageOf as k, goHttpImage as l, LOAD_FORMAT as lt, imageOf as m, estimateOf as mt, PINNED as n, memoryStatOf as nt, amqpClientImage as o, resourceReadingIn as ot, hikariClientImage as p, connectionsProblems as pt, RESOURCES_PROGRAM as q, REPOSITORY as r, networkOf as rt, basesOf as s, resourceReadingOf as st, CLIENT_NAMES as t, limitsProblems as tt, grpcClientImage as u, LOAD_PATH as ut, mongoClientImage as v, loadPlanOf as vt, routerImage as w, pgClientImage as x, streamsLoadOf as xt, nodeClientImage as y, loadVerdict as yt, npmVersions as z };
|
|
1455
1466
|
|
|
1456
|
-
//# sourceMappingURL=image-
|
|
1467
|
+
//# sourceMappingURL=image-B1jai9Lq.js.map
|