-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlocal_store_custom.rs
More file actions
51 lines (46 loc) · 1.58 KB
/
local_store_custom.rs
File metadata and controls
51 lines (46 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2025 Adobe. All rights reserved.
// This file is licensed to you under the Apache License,
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
// or the MIT license (http://opensource.org/licenses/MIT),
// at your option.
//
// Unless required by applicable law or agreed to in writing,
// this software is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
// specific language governing permissions and limitations under
// each license.
use lake_pulse::{Analyzer, StorageConfig};
#[tokio::main]
async fn main() {
// Initialize tracing
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let storage_config = StorageConfig::local().with_option("path", "./examples/data");
let analyzer = Analyzer::builder(storage_config)
.with_parallelism(5)
.build()
.await
.unwrap();
// Generate report
let report = analyzer
.analyze("delta_dataset_with_features")
.await
.unwrap();
// Print as JSON
println!("{}", report);
// Print execution timeline as Gantt chart
println!(
"{}",
report
.timed_metrics
.duration_collection_as_gantt(None)
.unwrap()
);
// Print as Chrome tracing
println!("{}", report.timed_metrics.to_chrome_tracing().unwrap());
}