forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bump-node-16.8.0
- Loading branch information
Showing
276 changed files
with
5,912 additions
and
2,285 deletions.
There are no files selected for viewing
Binary file added
BIN
+33.1 KB
...oper/advanced/images/sharing-saved-objects-faq-multiple-deep-link-objects-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+59.6 KB
...oper/advanced/images/sharing-saved-objects-faq-multiple-deep-link-objects-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.64 KB
(99%)
docs/developer/advanced/images/sharing-saved-objects-step-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { ToolingLog } from '@kbn/dev-utils'; | ||
import * as Rx from 'rxjs'; | ||
import { tap } from 'rxjs/operators'; | ||
|
||
import { OptimizerUpdate } from './run_optimizer'; | ||
|
||
const PROGRESS_REPORT_INTERVAL = 10_000; | ||
|
||
export function logOptimizerProgress( | ||
log: ToolingLog | ||
): Rx.MonoTypeOperatorFunction<OptimizerUpdate> { | ||
return (update$) => | ||
new Rx.Observable((subscriber) => { | ||
const allBundleIds = new Set(); | ||
const completeBundles = new Set(); | ||
let loggedCompletion = new Set(); | ||
|
||
// catalog bundle ids and which have completed at least once, forward | ||
// updates to next subscriber | ||
subscriber.add( | ||
update$ | ||
.pipe( | ||
tap(({ state }) => { | ||
for (const { bundleId, type } of state.compilerStates) { | ||
allBundleIds.add(bundleId); | ||
if (type !== 'running') { | ||
completeBundles.add(bundleId); | ||
} | ||
} | ||
}), | ||
tap(subscriber) | ||
) | ||
.subscribe() | ||
); | ||
|
||
// on interval check to see if at least 3 new bundles have completed at | ||
// least one build and log about our progress if so | ||
subscriber.add( | ||
Rx.interval(PROGRESS_REPORT_INTERVAL).subscribe( | ||
() => { | ||
if (completeBundles.size - loggedCompletion.size < 3) { | ||
return; | ||
} | ||
|
||
log.info( | ||
`[${completeBundles.size}/${allBundleIds.size}] initial bundle builds complete` | ||
); | ||
loggedCompletion = new Set(completeBundles); | ||
}, | ||
(error) => subscriber.error(error) | ||
) | ||
); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.