apify 2.3.1-beta.4 → 3.0.0-alpha.0
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/README.md +6 -5
- package/package.json +69 -128
- package/build/actor.d.ts +0 -113
- package/build/actor.d.ts.map +0 -1
- package/build/actor.js +0 -582
- package/build/actor.js.map +0 -1
- package/build/apify.d.ts +0 -752
- package/build/apify.d.ts.map +0 -1
- package/build/apify.js +0 -877
- package/build/apify.js.map +0 -1
- package/build/autoscaling/autoscaled_pool.d.ts +0 -384
- package/build/autoscaling/autoscaled_pool.d.ts.map +0 -1
- package/build/autoscaling/autoscaled_pool.js +0 -557
- package/build/autoscaling/autoscaled_pool.js.map +0 -1
- package/build/autoscaling/snapshotter.d.ts +0 -278
- package/build/autoscaling/snapshotter.d.ts.map +0 -1
- package/build/autoscaling/snapshotter.js +0 -447
- package/build/autoscaling/snapshotter.js.map +0 -1
- package/build/autoscaling/system_status.d.ts +0 -224
- package/build/autoscaling/system_status.d.ts.map +0 -1
- package/build/autoscaling/system_status.js +0 -228
- package/build/autoscaling/system_status.js.map +0 -1
- package/build/browser_launchers/browser_launcher.d.ts +0 -154
- package/build/browser_launchers/browser_launcher.d.ts.map +0 -1
- package/build/browser_launchers/browser_launcher.js +0 -160
- package/build/browser_launchers/browser_launcher.js.map +0 -1
- package/build/browser_launchers/browser_plugin.d.ts +0 -23
- package/build/browser_launchers/browser_plugin.d.ts.map +0 -1
- package/build/browser_launchers/browser_plugin.js +0 -25
- package/build/browser_launchers/browser_plugin.js.map +0 -1
- package/build/browser_launchers/playwright_launcher.d.ts +0 -131
- package/build/browser_launchers/playwright_launcher.d.ts.map +0 -1
- package/build/browser_launchers/playwright_launcher.js +0 -150
- package/build/browser_launchers/playwright_launcher.js.map +0 -1
- package/build/browser_launchers/puppeteer_launcher.d.ts +0 -153
- package/build/browser_launchers/puppeteer_launcher.d.ts.map +0 -1
- package/build/browser_launchers/puppeteer_launcher.js +0 -197
- package/build/browser_launchers/puppeteer_launcher.js.map +0 -1
- package/build/cache_container.d.ts +0 -31
- package/build/cache_container.d.ts.map +0 -1
- package/build/cache_container.js +0 -48
- package/build/cache_container.js.map +0 -1
- package/build/configuration.d.ts +0 -226
- package/build/configuration.d.ts.map +0 -1
- package/build/configuration.js +0 -325
- package/build/configuration.js.map +0 -1
- package/build/constants.d.ts +0 -37
- package/build/constants.d.ts.map +0 -1
- package/build/constants.js +0 -41
- package/build/constants.js.map +0 -1
- package/build/crawlers/basic_crawler.d.ts +0 -443
- package/build/crawlers/basic_crawler.d.ts.map +0 -1
- package/build/crawlers/basic_crawler.js +0 -664
- package/build/crawlers/basic_crawler.js.map +0 -1
- package/build/crawlers/browser_crawler.d.ts +0 -512
- package/build/crawlers/browser_crawler.d.ts.map +0 -1
- package/build/crawlers/browser_crawler.js +0 -540
- package/build/crawlers/browser_crawler.js.map +0 -1
- package/build/crawlers/cheerio_crawler.d.ts +0 -931
- package/build/crawlers/cheerio_crawler.d.ts.map +0 -1
- package/build/crawlers/cheerio_crawler.js +0 -913
- package/build/crawlers/cheerio_crawler.js.map +0 -1
- package/build/crawlers/crawler_extension.d.ts +0 -10
- package/build/crawlers/crawler_extension.d.ts.map +0 -1
- package/build/crawlers/crawler_extension.js +0 -19
- package/build/crawlers/crawler_extension.js.map +0 -1
- package/build/crawlers/crawler_utils.d.ts +0 -34
- package/build/crawlers/crawler_utils.d.ts.map +0 -1
- package/build/crawlers/crawler_utils.js +0 -87
- package/build/crawlers/crawler_utils.js.map +0 -1
- package/build/crawlers/playwright_crawler.d.ts +0 -448
- package/build/crawlers/playwright_crawler.d.ts.map +0 -1
- package/build/crawlers/playwright_crawler.js +0 -299
- package/build/crawlers/playwright_crawler.js.map +0 -1
- package/build/crawlers/puppeteer_crawler.d.ts +0 -425
- package/build/crawlers/puppeteer_crawler.d.ts.map +0 -1
- package/build/crawlers/puppeteer_crawler.js +0 -299
- package/build/crawlers/puppeteer_crawler.js.map +0 -1
- package/build/crawlers/statistics.d.ts +0 -185
- package/build/crawlers/statistics.d.ts.map +0 -1
- package/build/crawlers/statistics.js +0 -331
- package/build/crawlers/statistics.js.map +0 -1
- package/build/enqueue_links/click_elements.d.ts +0 -179
- package/build/enqueue_links/click_elements.d.ts.map +0 -1
- package/build/enqueue_links/click_elements.js +0 -434
- package/build/enqueue_links/click_elements.js.map +0 -1
- package/build/enqueue_links/enqueue_links.d.ts +0 -117
- package/build/enqueue_links/enqueue_links.d.ts.map +0 -1
- package/build/enqueue_links/enqueue_links.js +0 -163
- package/build/enqueue_links/enqueue_links.js.map +0 -1
- package/build/enqueue_links/shared.d.ts +0 -42
- package/build/enqueue_links/shared.d.ts.map +0 -1
- package/build/enqueue_links/shared.js +0 -121
- package/build/enqueue_links/shared.js.map +0 -1
- package/build/errors.d.ts +0 -29
- package/build/errors.d.ts.map +0 -1
- package/build/errors.js +0 -38
- package/build/errors.js.map +0 -1
- package/build/events.d.ts +0 -11
- package/build/events.d.ts.map +0 -1
- package/build/events.js +0 -147
- package/build/events.js.map +0 -1
- package/build/index.d.ts +0 -4
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -7
- package/build/index.js.map +0 -1
- package/build/main.d.ts +0 -179
- package/build/main.d.ts.map +0 -1
- package/build/main.js +0 -81
- package/build/main.js.map +0 -1
- package/build/playwright_utils.d.ts +0 -9
- package/build/playwright_utils.d.ts.map +0 -1
- package/build/playwright_utils.js +0 -90
- package/build/playwright_utils.js.map +0 -1
- package/build/proxy_configuration.d.ts +0 -411
- package/build/proxy_configuration.d.ts.map +0 -1
- package/build/proxy_configuration.js +0 -517
- package/build/proxy_configuration.js.map +0 -1
- package/build/pseudo_url.d.ts +0 -86
- package/build/pseudo_url.d.ts.map +0 -1
- package/build/pseudo_url.js +0 -153
- package/build/pseudo_url.js.map +0 -1
- package/build/puppeteer_request_interception.d.ts +0 -8
- package/build/puppeteer_request_interception.d.ts.map +0 -1
- package/build/puppeteer_request_interception.js +0 -235
- package/build/puppeteer_request_interception.js.map +0 -1
- package/build/puppeteer_utils.d.ts +0 -250
- package/build/puppeteer_utils.d.ts.map +0 -1
- package/build/puppeteer_utils.js +0 -551
- package/build/puppeteer_utils.js.map +0 -1
- package/build/request.d.ts +0 -180
- package/build/request.d.ts.map +0 -1
- package/build/request.js +0 -261
- package/build/request.js.map +0 -1
- package/build/request_list.d.ts +0 -581
- package/build/request_list.d.ts.map +0 -1
- package/build/request_list.js +0 -826
- package/build/request_list.js.map +0 -1
- package/build/serialization.d.ts +0 -5
- package/build/serialization.d.ts.map +0 -1
- package/build/serialization.js +0 -139
- package/build/serialization.js.map +0 -1
- package/build/session_pool/errors.d.ts +0 -11
- package/build/session_pool/errors.d.ts.map +0 -1
- package/build/session_pool/errors.js +0 -18
- package/build/session_pool/errors.js.map +0 -1
- package/build/session_pool/events.d.ts +0 -5
- package/build/session_pool/events.d.ts.map +0 -1
- package/build/session_pool/events.js +0 -6
- package/build/session_pool/events.js.map +0 -1
- package/build/session_pool/session.d.ts +0 -286
- package/build/session_pool/session.d.ts.map +0 -1
- package/build/session_pool/session.js +0 -355
- package/build/session_pool/session.js.map +0 -1
- package/build/session_pool/session_pool.d.ts +0 -280
- package/build/session_pool/session_pool.d.ts.map +0 -1
- package/build/session_pool/session_pool.js +0 -393
- package/build/session_pool/session_pool.js.map +0 -1
- package/build/session_pool/session_utils.d.ts +0 -4
- package/build/session_pool/session_utils.d.ts.map +0 -1
- package/build/session_pool/session_utils.js +0 -24
- package/build/session_pool/session_utils.js.map +0 -1
- package/build/stealth/hiding_tricks.d.ts +0 -22
- package/build/stealth/hiding_tricks.d.ts.map +0 -1
- package/build/stealth/hiding_tricks.js +0 -308
- package/build/stealth/hiding_tricks.js.map +0 -1
- package/build/stealth/stealth.d.ts +0 -56
- package/build/stealth/stealth.d.ts.map +0 -1
- package/build/stealth/stealth.js +0 -125
- package/build/stealth/stealth.js.map +0 -1
- package/build/storages/dataset.d.ts +0 -288
- package/build/storages/dataset.d.ts.map +0 -1
- package/build/storages/dataset.js +0 -480
- package/build/storages/dataset.js.map +0 -1
- package/build/storages/key_value_store.d.ts +0 -243
- package/build/storages/key_value_store.d.ts.map +0 -1
- package/build/storages/key_value_store.js +0 -462
- package/build/storages/key_value_store.js.map +0 -1
- package/build/storages/request_queue.d.ts +0 -318
- package/build/storages/request_queue.d.ts.map +0 -1
- package/build/storages/request_queue.js +0 -636
- package/build/storages/request_queue.js.map +0 -1
- package/build/storages/storage_manager.d.ts +0 -87
- package/build/storages/storage_manager.d.ts.map +0 -1
- package/build/storages/storage_manager.js +0 -150
- package/build/storages/storage_manager.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/build/typedefs.d.ts +0 -146
- package/build/typedefs.d.ts.map +0 -1
- package/build/typedefs.js +0 -88
- package/build/typedefs.js.map +0 -1
- package/build/utils.d.ts +0 -175
- package/build/utils.d.ts.map +0 -1
- package/build/utils.js +0 -731
- package/build/utils.js.map +0 -1
- package/build/utils_log.d.ts +0 -41
- package/build/utils_log.d.ts.map +0 -1
- package/build/utils_log.js +0 -192
- package/build/utils_log.js.map +0 -1
- package/build/utils_request.d.ts +0 -77
- package/build/utils_request.d.ts.map +0 -1
- package/build/utils_request.js +0 -385
- package/build/utils_request.js.map +0 -1
- package/build/utils_social.d.ts +0 -210
- package/build/utils_social.d.ts.map +0 -1
- package/build/utils_social.js +0 -787
- package/build/utils_social.js.map +0 -1
- package/build/validators.d.ts +0 -23
- package/build/validators.d.ts.map +0 -1
- package/build/validators.js +0 -29
- package/build/validators.js.map +0 -1
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
export default Snapshotter;
|
|
2
|
-
export type SnapshotterOptions = {
|
|
3
|
-
/**
|
|
4
|
-
* Defines the interval of measuring the event loop response time.
|
|
5
|
-
*/
|
|
6
|
-
eventLoopSnapshotIntervalSecs?: number | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Defines the interval of checking the current state
|
|
9
|
-
* of the remote API client.
|
|
10
|
-
*/
|
|
11
|
-
clientSnapshotIntervalSecs?: number | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Maximum allowed delay of the event loop in milliseconds.
|
|
14
|
-
* Exceeding this limit overloads the event loop.
|
|
15
|
-
*/
|
|
16
|
-
maxBlockedMillis?: number | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Defines the interval of measuring CPU usage.
|
|
19
|
-
* This is only used when running locally. On the Apify platform,
|
|
20
|
-
* the statistics are provided externally at a fixed interval.
|
|
21
|
-
*/
|
|
22
|
-
cpuSnapshotIntervalSecs?: number | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Defines the maximum usage of CPU.
|
|
25
|
-
* Exceeding this limit overloads the CPU.
|
|
26
|
-
*/
|
|
27
|
-
maxUsedCpuRatio?: number | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Defines the interval of measuring memory consumption.
|
|
30
|
-
* This is only used when running locally. On the Apify platform,
|
|
31
|
-
* the statistics are provided externally at a fixed interval.
|
|
32
|
-
* The measurement itself is resource intensive (25 - 50ms async).
|
|
33
|
-
* Therefore, setting this interval below 1 second is not recommended.
|
|
34
|
-
*/
|
|
35
|
-
memorySnapshotIntervalSecs?: number | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Defines the maximum ratio of total memory that can be used.
|
|
38
|
-
* Exceeding this limit overloads the memory.
|
|
39
|
-
*/
|
|
40
|
-
maxUsedMemoryRatio?: number | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Defines the maximum number of new rate limit errors within
|
|
43
|
-
* the given interval.
|
|
44
|
-
*/
|
|
45
|
-
maxClientErrors?: number | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Sets the interval in seconds for which a history of resource snapshots
|
|
48
|
-
* will be kept. Increasing this to very high numbers will affect performance.
|
|
49
|
-
*/
|
|
50
|
-
snapshotHistorySecs?: number | undefined;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @typedef SnapshotterOptions
|
|
54
|
-
* @property {number} [eventLoopSnapshotIntervalSecs=0.5]
|
|
55
|
-
* Defines the interval of measuring the event loop response time.
|
|
56
|
-
* @property {number} [clientSnapshotIntervalSecs=1]
|
|
57
|
-
* Defines the interval of checking the current state
|
|
58
|
-
* of the remote API client.
|
|
59
|
-
* @property {number} [maxBlockedMillis=50]
|
|
60
|
-
* Maximum allowed delay of the event loop in milliseconds.
|
|
61
|
-
* Exceeding this limit overloads the event loop.
|
|
62
|
-
* @property {number} [cpuSnapshotIntervalSecs=1]
|
|
63
|
-
* Defines the interval of measuring CPU usage.
|
|
64
|
-
* This is only used when running locally. On the Apify platform,
|
|
65
|
-
* the statistics are provided externally at a fixed interval.
|
|
66
|
-
* @property {number} [maxUsedCpuRatio=0.95]
|
|
67
|
-
* Defines the maximum usage of CPU.
|
|
68
|
-
* Exceeding this limit overloads the CPU.
|
|
69
|
-
* @property {number} [memorySnapshotIntervalSecs=1]
|
|
70
|
-
* Defines the interval of measuring memory consumption.
|
|
71
|
-
* This is only used when running locally. On the Apify platform,
|
|
72
|
-
* the statistics are provided externally at a fixed interval.
|
|
73
|
-
* The measurement itself is resource intensive (25 - 50ms async).
|
|
74
|
-
* Therefore, setting this interval below 1 second is not recommended.
|
|
75
|
-
* @property {number} [maxUsedMemoryRatio=0.7]
|
|
76
|
-
* Defines the maximum ratio of total memory that can be used.
|
|
77
|
-
* Exceeding this limit overloads the memory.
|
|
78
|
-
* @property {number} [maxClientErrors=1]
|
|
79
|
-
* Defines the maximum number of new rate limit errors within
|
|
80
|
-
* the given interval.
|
|
81
|
-
* @property {number} [snapshotHistorySecs=60]
|
|
82
|
-
* Sets the interval in seconds for which a history of resource snapshots
|
|
83
|
-
* will be kept. Increasing this to very high numbers will affect performance.
|
|
84
|
-
*/
|
|
85
|
-
/**
|
|
86
|
-
* Creates snapshots of system resources at given intervals and marks the resource
|
|
87
|
-
* as either overloaded or not during the last interval. Keeps a history of the snapshots.
|
|
88
|
-
* It tracks the following resources: Memory, EventLoop, API and CPU.
|
|
89
|
-
* The class is used by the {@link AutoscaledPool} class.
|
|
90
|
-
*
|
|
91
|
-
* When running on the Apify platform, the CPU and memory statistics are provided by the platform,
|
|
92
|
-
* as collected from the running Docker container. When running locally, `Snapshotter`
|
|
93
|
-
* makes its own statistics by querying the OS.
|
|
94
|
-
*
|
|
95
|
-
* CPU becomes overloaded locally when its current use exceeds the `maxUsedCpuRatio` option or
|
|
96
|
-
* when Apify platform marks it as overloaded.
|
|
97
|
-
*
|
|
98
|
-
* Memory becomes overloaded if its current use exceeds the `maxUsedMemoryRatio` option.
|
|
99
|
-
* It's computed using the total memory available to the container when running on
|
|
100
|
-
* the Apify platform and a quarter of total system memory when running locally.
|
|
101
|
-
* Max total memory when running locally may be overridden by using the `APIFY_MEMORY_MBYTES`
|
|
102
|
-
* environment variable.
|
|
103
|
-
*
|
|
104
|
-
* Event loop becomes overloaded if it slows down by more than the `maxBlockedMillis` option.
|
|
105
|
-
*
|
|
106
|
-
* Client becomes overloaded when rate limit errors (429 - Too Many Requests),
|
|
107
|
-
* typically received from the request queue, exceed the set limit within the set interval.
|
|
108
|
-
*/
|
|
109
|
-
declare class Snapshotter {
|
|
110
|
-
/**
|
|
111
|
-
* @param {SnapshotterOptions} [options] All `Snapshotter` configuration options.
|
|
112
|
-
*/
|
|
113
|
-
constructor(options?: SnapshotterOptions | undefined);
|
|
114
|
-
/** @type {Log} */
|
|
115
|
-
log: Log;
|
|
116
|
-
eventLoopSnapshotIntervalMillis: number;
|
|
117
|
-
memorySnapshotIntervalMillis: number;
|
|
118
|
-
clientSnapshotIntervalMillis: number;
|
|
119
|
-
cpuSnapshotIntervalMillis: number;
|
|
120
|
-
snapshotHistoryMillis: number;
|
|
121
|
-
maxBlockedMillis: number;
|
|
122
|
-
maxUsedMemoryRatio: number;
|
|
123
|
-
maxUsedCpuRatio: number;
|
|
124
|
-
maxClientErrors: number;
|
|
125
|
-
maxMemoryBytes: number | null;
|
|
126
|
-
cpuSnapshots: any[];
|
|
127
|
-
eventLoopSnapshots: any[];
|
|
128
|
-
memorySnapshots: any[];
|
|
129
|
-
clientSnapshots: any[];
|
|
130
|
-
eventLoopInterval: import("@apify/utilities").BetterIntervalID | null;
|
|
131
|
-
memoryInterval: import("@apify/utilities").BetterIntervalID | null;
|
|
132
|
-
clientInterval: import("@apify/utilities").BetterIntervalID | null;
|
|
133
|
-
cpuInterval: import("@apify/utilities").BetterIntervalID | null;
|
|
134
|
-
lastLoggedCriticalMemoryOverloadAt: Date | null;
|
|
135
|
-
/**
|
|
136
|
-
* Creates a snapshot of current CPU usage
|
|
137
|
-
* using the Apify platform `systemInfo` event.
|
|
138
|
-
* @param {Object} systemInfo
|
|
139
|
-
* @ignore
|
|
140
|
-
* @protected
|
|
141
|
-
* @internal
|
|
142
|
-
*/
|
|
143
|
-
protected _snapshotCpuOnPlatform(systemInfo: Object): void;
|
|
144
|
-
/**
|
|
145
|
-
* Creates a snapshot of current memory usage
|
|
146
|
-
* using the Apify platform `systemInfo` event.
|
|
147
|
-
* @param {*} systemInfo
|
|
148
|
-
* @ignore
|
|
149
|
-
* @protected
|
|
150
|
-
* @internal
|
|
151
|
-
*/
|
|
152
|
-
protected _snapshotMemoryOnPlatform(systemInfo: any): void;
|
|
153
|
-
/**
|
|
154
|
-
* Starts capturing snapshots at configured intervals.
|
|
155
|
-
* @return {Promise<void>}
|
|
156
|
-
*/
|
|
157
|
-
start(): Promise<void>;
|
|
158
|
-
/**
|
|
159
|
-
* Stops all resource capturing.
|
|
160
|
-
* @return {Promise<void>}
|
|
161
|
-
*/
|
|
162
|
-
stop(): Promise<void>;
|
|
163
|
-
/**
|
|
164
|
-
* Returns a sample of latest memory snapshots, with the size of the sample defined
|
|
165
|
-
* by the sampleDurationMillis parameter. If omitted, it returns a full snapshot history.
|
|
166
|
-
* @param {number} [sampleDurationMillis]
|
|
167
|
-
* @return {Array<*>}
|
|
168
|
-
*/
|
|
169
|
-
getMemorySample(sampleDurationMillis?: number | undefined): Array<any>;
|
|
170
|
-
/**
|
|
171
|
-
* Returns a sample of latest event loop snapshots, with the size of the sample defined
|
|
172
|
-
* by the sampleDurationMillis parameter. If omitted, it returns a full snapshot history.
|
|
173
|
-
* @param {number} [sampleDurationMillis]
|
|
174
|
-
* @return {Array<*>}
|
|
175
|
-
*/
|
|
176
|
-
getEventLoopSample(sampleDurationMillis?: number | undefined): Array<any>;
|
|
177
|
-
/**
|
|
178
|
-
* Returns a sample of latest CPU snapshots, with the size of the sample defined
|
|
179
|
-
* by the sampleDurationMillis parameter. If omitted, it returns a full snapshot history.
|
|
180
|
-
* @param {number} [sampleDurationMillis]
|
|
181
|
-
* @return {Array<*>}
|
|
182
|
-
*/
|
|
183
|
-
getCpuSample(sampleDurationMillis?: number | undefined): Array<any>;
|
|
184
|
-
/**
|
|
185
|
-
* Returns a sample of latest Client snapshots, with the size of the sample defined
|
|
186
|
-
* by the sampleDurationMillis parameter. If omitted, it returns a full snapshot history.
|
|
187
|
-
* @param {number} sampleDurationMillis
|
|
188
|
-
* @return {Array<*>}
|
|
189
|
-
*/
|
|
190
|
-
getClientSample(sampleDurationMillis: number): Array<any>;
|
|
191
|
-
/**
|
|
192
|
-
* Finds the latest snapshots by sampleDurationMillis in the provided array.
|
|
193
|
-
* @param {Array<*>} snapshots
|
|
194
|
-
* @param {number} [sampleDurationMillis]
|
|
195
|
-
* @return {Array<*>}
|
|
196
|
-
* @ignore
|
|
197
|
-
* @protected
|
|
198
|
-
* @internal
|
|
199
|
-
*/
|
|
200
|
-
protected _getSample(snapshots: Array<any>, sampleDurationMillis?: number | undefined): Array<any>;
|
|
201
|
-
/**
|
|
202
|
-
* Creates a snapshot of current memory usage
|
|
203
|
-
* using the Apify platform `systemInfo` event.
|
|
204
|
-
* @param {Function} intervalCallback
|
|
205
|
-
* @return {Promise<void>}
|
|
206
|
-
* @ignore
|
|
207
|
-
* @protected
|
|
208
|
-
* @internal
|
|
209
|
-
*/
|
|
210
|
-
protected _snapshotMemoryOnLocal(intervalCallback: Function): Promise<void>;
|
|
211
|
-
/**
|
|
212
|
-
* Checks for critical memory overload and logs it to the console.
|
|
213
|
-
* @param {*} systemInfo
|
|
214
|
-
* @ignore
|
|
215
|
-
* @protected
|
|
216
|
-
* @internal
|
|
217
|
-
*/
|
|
218
|
-
protected _memoryOverloadWarning({ memCurrentBytes }: any): void;
|
|
219
|
-
/**
|
|
220
|
-
* Creates a snapshot of current event loop delay.
|
|
221
|
-
* @param {Function} intervalCallback
|
|
222
|
-
* @ignore
|
|
223
|
-
* @protected
|
|
224
|
-
* @internal
|
|
225
|
-
*/
|
|
226
|
-
protected _snapshotEventLoop(intervalCallback: Function): void;
|
|
227
|
-
/**
|
|
228
|
-
* Creates a snapshot of current CPU usage
|
|
229
|
-
* using OS provided metrics.
|
|
230
|
-
* @param {Function} intervalCallback
|
|
231
|
-
* @ignore
|
|
232
|
-
* @protected
|
|
233
|
-
* @internal
|
|
234
|
-
*/
|
|
235
|
-
protected _snapshotCpuOnLocal(intervalCallback: Function): void;
|
|
236
|
-
/**
|
|
237
|
-
* @ignore
|
|
238
|
-
* @protected
|
|
239
|
-
* @internal
|
|
240
|
-
*/
|
|
241
|
-
protected _getCurrentCpuTicks(): {
|
|
242
|
-
idle: number;
|
|
243
|
-
total: number;
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Creates a snapshot of current API state by checking for
|
|
247
|
-
* rate limit errors. Only errors produced by a 2nd retry
|
|
248
|
-
* of the API call are considered for snapshotting since
|
|
249
|
-
* earlier errors may just be caused by a random spike in
|
|
250
|
-
* number of requests and do not necessarily signify API
|
|
251
|
-
* overloading.
|
|
252
|
-
*
|
|
253
|
-
* @param intervalCallback
|
|
254
|
-
* @ignore
|
|
255
|
-
* @protected
|
|
256
|
-
* @internal
|
|
257
|
-
*/
|
|
258
|
-
protected _snapshotClient(intervalCallback: any): void;
|
|
259
|
-
/**
|
|
260
|
-
* Removes snapshots that are older than the snapshotHistorySecs option
|
|
261
|
-
* from the array (destructively - in place).
|
|
262
|
-
* @param {Array<*>} snapshots
|
|
263
|
-
* @param {Date} now
|
|
264
|
-
* @ignore
|
|
265
|
-
* @protected
|
|
266
|
-
* @internal
|
|
267
|
-
*/
|
|
268
|
-
protected _pruneSnapshots(snapshots: Array<any>, now: Date): void;
|
|
269
|
-
/**
|
|
270
|
-
* Calculate max memory for platform or local usage.
|
|
271
|
-
* @ignore
|
|
272
|
-
* @protected
|
|
273
|
-
* @internal
|
|
274
|
-
*/
|
|
275
|
-
protected _ensureCorrectMaxMemory(): Promise<void>;
|
|
276
|
-
}
|
|
277
|
-
import { Log } from "../utils_log";
|
|
278
|
-
//# sourceMappingURL=snapshotter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshotter.d.ts","sourceRoot":"","sources":["../../src/autoscaling/snapshotter.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IACI;;OAEG;IACH,sDAwDC;IA7BG,kBAAkB;IAClB,KADW,GAAG,CACiC;IAE/C,wCAA2E;IAC3E,qCAAqE;IACrE,qCAAqE;IACrE,kCAA+D;IAC/D,8BAAuD;IACvD,yBAAwC;IACxC,2BAA4C;IAC5C,wBAAsC;IACtC,wBAAsC;IACtC,8BAA+F;IAE/F,oBAAsB;IACtB,0BAA4B;IAC5B,uBAAyB;IACzB,uBAAyB;IAEzB,sEAA6B;IAC7B,mEAA0B;IAC1B,mEAA0B;IAC1B,gEAAuB;IAEvB,gDAA8C;IAsNlD;;;;;;;OAOG;IACH,6CALW,MAAM,QAehB;IA9HD;;;;;;;OAOG;IACH,2DAYC;IAvHD;;;OAGG;IACH,SAFY,QAAQ,IAAI,CAAC,CAexB;IAED;;;OAGG;IACH,QAFY,QAAQ,IAAI,CAAC,CAWxB;IAED;;;;;OAKG;IACH,4DAFY,UAAQ,CAInB;IAED;;;;;OAKG;IACH,+DAFY,UAAQ,CAInB;IAED;;;;;OAKG;IACH,yDAFY,UAAQ,CAInB;IAED;;;;;OAKG;IACH,sCAHW,MAAM,GACL,UAAQ,CAInB;IAED;;;;;;;;OAQG;IACH,gCAPW,UAAQ,8CAEP,UAAQ,CAmBnB;IAwBD;;;;;;;;OAQG;IACH,8DALY,QAAQ,IAAI,CAAC,CAyBxB;IAED;;;;;;OAMG;IACH,iEAgBC;IAED;;;;;;OAMG;IACH,+DAqBC;IAsBD;;;;;;;OAOG;IACH,gEAyBC;IAED;;;;OAIG;IACH;;;MASC;IAED;;;;;;;;;;;;OAYG;IACH,uDAsBC;IAED;;;;;;;;OAQG;IACH,qCANW,UAAQ,OACR,IAAI,QAad;IAED;;;;;OAKG;IACH,mDAUC;CACJ"}
|