oxirs-rule 0.2.4

Forward/backward rule engine for RDFS, OWL, and SWRL reasoning
Documentation
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
//! Integration Performance Benchmarks
//!
//! Comprehensive benchmarks for measuring and tracking performance of:
//! - SPARQL Integration (query execution modes)
//! - SHACL Integration (validation workflows)
//! - Distributed Reasoning (scaling characteristics)
//! - Rule Composition (module management overhead)
//!
//! # Running Benchmarks
//!
//! ```rust
//! use oxirs_rule::integration_benchmarks::IntegrationBenchmarkSuite;
//!
//! let mut suite = IntegrationBenchmarkSuite::new();
//! let results = suite.run_all_benchmarks().expect("should succeed");
//! println!("{:?}", results);
//! ```

use crate::{
    composition::{CompositionManager, RuleModule},
    distributed::{DistributedReasoner, Node, PartitionStrategy},
    shacl_integration::{ShaclRuleIntegration, ShapeConstraint, ValidationMode},
    sparql_integration::{QueryMode, QueryPattern, SparqlRuleIntegration},
    Rule, RuleAtom, RuleEngine, Term,
};
use anyhow::Result;
use std::time::{Duration, Instant};

/// Benchmark result for a single test
#[derive(Debug, Clone)]
pub struct BenchmarkResult {
    /// Benchmark name
    pub name: String,
    /// Number of operations performed
    pub operations: usize,
    /// Total execution time
    pub duration: Duration,
    /// Operations per second
    pub ops_per_sec: f64,
    /// Average time per operation (microseconds)
    pub avg_time_us: f64,
}

impl BenchmarkResult {
    pub fn new(name: String, operations: usize, duration: Duration) -> Self {
        let secs = duration.as_secs_f64();
        let ops_per_sec = if secs > 0.0 {
            operations as f64 / secs
        } else {
            0.0
        };
        let avg_time_us = if operations > 0 {
            duration.as_micros() as f64 / operations as f64
        } else {
            0.0
        };

        Self {
            name,
            operations,
            duration,
            ops_per_sec,
            avg_time_us,
        }
    }
}

impl std::fmt::Display for BenchmarkResult {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        writeln!(f, "Benchmark: {}", self.name)?;
        writeln!(f, "  Operations: {}", self.operations)?;
        writeln!(f, "  Duration: {:?}", self.duration)?;
        writeln!(f, "  Throughput: {:.2} ops/sec", self.ops_per_sec)?;
        writeln!(f, "  Avg Time: {:.2} μs/op", self.avg_time_us)?;
        Ok(())
    }
}

/// Complete benchmark suite for integration features
pub struct IntegrationBenchmarkSuite {
    /// Results from all benchmarks
    results: Vec<BenchmarkResult>,
}

impl IntegrationBenchmarkSuite {
    /// Create a new benchmark suite
    pub fn new() -> Self {
        Self {
            results: Vec::new(),
        }
    }

    /// Run all benchmarks
    pub fn run_all_benchmarks(&mut self) -> Result<&[BenchmarkResult]> {
        println!("Running Integration Performance Benchmarks...\n");

        // SPARQL Integration Benchmarks
        self.benchmark_sparql_direct_query(1000)?;
        self.benchmark_sparql_forward_reasoning(100)?;
        self.benchmark_sparql_backward_reasoning(100)?;
        self.benchmark_sparql_hybrid_reasoning(100)?;

        // SHACL Integration Benchmarks
        self.benchmark_shacl_direct_validation(1000)?;
        self.benchmark_shacl_pre_reasoning(100)?;
        self.benchmark_shacl_post_reasoning(100)?;
        self.benchmark_shacl_full_validation(100)?;

        // Distributed Reasoning Benchmarks
        self.benchmark_distributed_round_robin(100)?;
        self.benchmark_distributed_load_balanced(100)?;
        self.benchmark_distributed_scaling()?;

        // Rule Composition Benchmarks
        self.benchmark_module_registration(1000)?;
        self.benchmark_template_instantiation(1000)?;

        Ok(&self.results)
    }

    /// Benchmark SPARQL direct query (no reasoning)
    fn benchmark_sparql_direct_query(&mut self, iterations: usize) -> Result<()> {
        let mut engine = RuleEngine::new();

        // Add test facts
        for i in 0..100 {
            engine.add_fact(RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            });
        }

        let mut sparql = SparqlRuleIntegration::new(engine);
        sparql.set_mode(QueryMode::Direct);

        let pattern = QueryPattern::new(None, Some("hasProperty".to_string()), None);

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = sparql.query_with_reasoning(std::slice::from_ref(&pattern))?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SPARQL Direct Query".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SPARQL forward reasoning
    fn benchmark_sparql_forward_reasoning(&mut self, iterations: usize) -> Result<()> {
        let mut engine = RuleEngine::new();

        // Add rule
        engine.add_rule(Rule {
            name: "inference_rule".to_string(),
            body: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
            head: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("derived".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
        });

        // Add facts
        for i in 0..50 {
            engine.add_fact(RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            });
        }

        let mut sparql = SparqlRuleIntegration::new(engine);
        sparql.set_mode(QueryMode::ForwardReasoning);

        let pattern = QueryPattern::new(None, Some("derived".to_string()), None);

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = sparql.query_with_reasoning(std::slice::from_ref(&pattern))?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SPARQL Forward Reasoning".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SPARQL backward reasoning
    fn benchmark_sparql_backward_reasoning(&mut self, iterations: usize) -> Result<()> {
        let mut engine = RuleEngine::new();

        engine.add_rule(Rule {
            name: "inference_rule".to_string(),
            body: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
            head: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("derived".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
        });

        for i in 0..50 {
            engine.add_fact(RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            });
        }

        let mut sparql = SparqlRuleIntegration::new(engine);
        sparql.set_mode(QueryMode::BackwardReasoning);

        let pattern = QueryPattern::new(
            Some("entity_0".to_string()),
            Some("derived".to_string()),
            Some("value_0".to_string()),
        );

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = sparql.query_with_reasoning(std::slice::from_ref(&pattern))?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SPARQL Backward Reasoning".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SPARQL hybrid reasoning
    fn benchmark_sparql_hybrid_reasoning(&mut self, iterations: usize) -> Result<()> {
        let mut engine = RuleEngine::new();

        engine.add_rule(Rule {
            name: "inference_rule".to_string(),
            body: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
            head: vec![RuleAtom::Triple {
                subject: Term::Variable("X".to_string()),
                predicate: Term::Constant("derived".to_string()),
                object: Term::Variable("Y".to_string()),
            }],
        });

        for i in 0..50 {
            engine.add_fact(RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            });
        }

        let mut sparql = SparqlRuleIntegration::new(engine);
        sparql.set_mode(QueryMode::Hybrid);

        let pattern = QueryPattern::new(None, Some("derived".to_string()), None);

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = sparql.query_with_reasoning(std::slice::from_ref(&pattern))?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SPARQL Hybrid Reasoning".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SHACL direct validation
    fn benchmark_shacl_direct_validation(&mut self, iterations: usize) -> Result<()> {
        let engine = RuleEngine::new();
        let mut shacl = ShaclRuleIntegration::new(engine);
        shacl.set_mode(ValidationMode::Direct);

        let constraint =
            ShapeConstraint::new("test_constraint".to_string(), "sh:minCount".to_string());

        let facts: Vec<RuleAtom> = (0..100)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = shacl.validate_with_reasoning(std::slice::from_ref(&constraint), &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SHACL Direct Validation".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SHACL pre-reasoning validation
    fn benchmark_shacl_pre_reasoning(&mut self, iterations: usize) -> Result<()> {
        let engine = RuleEngine::new();
        let mut shacl = ShaclRuleIntegration::new(engine);
        shacl.set_mode(ValidationMode::PreReasoning);

        let constraint =
            ShapeConstraint::new("test_constraint".to_string(), "sh:minCount".to_string());

        let facts: Vec<RuleAtom> = (0..50)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = shacl.validate_with_reasoning(std::slice::from_ref(&constraint), &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SHACL Pre-Reasoning Validation".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SHACL post-reasoning validation
    fn benchmark_shacl_post_reasoning(&mut self, iterations: usize) -> Result<()> {
        let engine = RuleEngine::new();
        let mut shacl = ShaclRuleIntegration::new(engine);
        shacl.set_mode(ValidationMode::PostReasoning);

        let constraint =
            ShapeConstraint::new("test_constraint".to_string(), "sh:minCount".to_string());

        let facts: Vec<RuleAtom> = (0..50)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = shacl.validate_with_reasoning(std::slice::from_ref(&constraint), &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SHACL Post-Reasoning Validation".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark SHACL full validation (pre + post reasoning)
    fn benchmark_shacl_full_validation(&mut self, iterations: usize) -> Result<()> {
        let engine = RuleEngine::new();
        let mut shacl = ShaclRuleIntegration::new(engine);
        shacl.set_mode(ValidationMode::Full);

        let constraint =
            ShapeConstraint::new("test_constraint".to_string(), "sh:minCount".to_string());

        let facts: Vec<RuleAtom> = (0..50)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = shacl.validate_with_reasoning(std::slice::from_ref(&constraint), &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "SHACL Full Validation".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark distributed reasoning with round-robin
    fn benchmark_distributed_round_robin(&mut self, iterations: usize) -> Result<()> {
        let mut reasoner = DistributedReasoner::new(PartitionStrategy::RoundRobin);

        // Register nodes
        for i in 1..=4 {
            reasoner.register_node(Node::new(
                format!("node_{}", i),
                format!("localhost:800{}", i),
            ))?;
        }

        let rules = vec![Rule {
            name: "test_rule".to_string(),
            body: vec![],
            head: vec![],
        }];

        let facts: Vec<RuleAtom> = (0..100)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = reasoner.execute_distributed(&rules, &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "Distributed Round-Robin (4 nodes)".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark distributed reasoning with load balancing
    fn benchmark_distributed_load_balanced(&mut self, iterations: usize) -> Result<()> {
        let mut reasoner = DistributedReasoner::new(PartitionStrategy::LoadBalanced);

        // Register nodes with different capacities
        reasoner.register_node(
            Node::new("node_1".to_string(), "localhost:8001".to_string()).with_capacity(1000),
        )?;
        reasoner.register_node(
            Node::new("node_2".to_string(), "localhost:8002".to_string()).with_capacity(2000),
        )?;
        reasoner.register_node(
            Node::new("node_3".to_string(), "localhost:8003".to_string()).with_capacity(1500),
        )?;

        let rules = vec![Rule {
            name: "test_rule".to_string(),
            body: vec![],
            head: vec![],
        }];

        let facts: Vec<RuleAtom> = (0..100)
            .map(|i| RuleAtom::Triple {
                subject: Term::Constant(format!("entity_{}", i)),
                predicate: Term::Constant("hasProperty".to_string()),
                object: Term::Constant(format!("value_{}", i)),
            })
            .collect();

        let start = Instant::now();
        for _ in 0..iterations {
            let _ = reasoner.execute_distributed(&rules, &facts)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "Distributed Load-Balanced (3 nodes)".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark distributed reasoning scaling (1, 2, 4, 8 nodes)
    fn benchmark_distributed_scaling(&mut self) -> Result<()> {
        let node_counts = [1, 2, 4, 8];
        let iterations = 50;

        for &node_count in &node_counts {
            let mut reasoner = DistributedReasoner::new(PartitionStrategy::LoadBalanced);

            for i in 1..=node_count {
                reasoner.register_node(Node::new(
                    format!("node_{}", i),
                    format!("localhost:800{}", i),
                ))?;
            }

            let rules = vec![Rule {
                name: "test_rule".to_string(),
                body: vec![],
                head: vec![],
            }];

            let facts: Vec<RuleAtom> = (0..200)
                .map(|i| RuleAtom::Triple {
                    subject: Term::Constant(format!("entity_{}", i)),
                    predicate: Term::Constant("hasProperty".to_string()),
                    object: Term::Constant(format!("value_{}", i)),
                })
                .collect();

            let start = Instant::now();
            for _ in 0..iterations {
                let _ = reasoner.execute_distributed(&rules, &facts)?;
            }
            let duration = start.elapsed();

            self.results.push(BenchmarkResult::new(
                format!("Distributed Scaling ({} nodes)", node_count),
                iterations,
                duration,
            ));
        }

        Ok(())
    }

    /// Benchmark module registration overhead
    fn benchmark_module_registration(&mut self, iterations: usize) -> Result<()> {
        let start = Instant::now();
        for i in 0..iterations {
            let mut manager = CompositionManager::new();
            let module = RuleModule::new(format!("module_{}", i));
            let _ = manager.register_module(module);
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "Module Registration".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Benchmark template instantiation
    fn benchmark_template_instantiation(&mut self, iterations: usize) -> Result<()> {
        use crate::composition::RuleTemplate;
        use std::collections::HashMap;

        let mut template = RuleTemplate::new(
            "test_template".to_string(),
            vec!["param1".to_string(), "param2".to_string()],
        );

        template.set_body(vec![RuleAtom::Triple {
            subject: Term::Constant("${param1}".to_string()),
            predicate: Term::Constant("hasProperty".to_string()),
            object: Term::Constant("${param2}".to_string()),
        }]);

        let mut args = HashMap::new();
        args.insert("param1".to_string(), Term::Constant("entity".to_string()));
        args.insert("param2".to_string(), Term::Constant("value".to_string()));

        let start = Instant::now();
        for i in 0..iterations {
            let _ = template.instantiate(format!("rule_{}", i), &args)?;
        }
        let duration = start.elapsed();

        self.results.push(BenchmarkResult::new(
            "Template Instantiation".to_string(),
            iterations,
            duration,
        ));

        Ok(())
    }

    /// Get all benchmark results
    pub fn results(&self) -> &[BenchmarkResult] {
        &self.results
    }

    /// Print summary report
    pub fn print_summary(&self) {
        println!("\n=== Integration Performance Benchmark Summary ===\n");

        for result in &self.results {
            println!("{}", result);
        }

        println!("=== End of Benchmark Report ===\n");
    }
}

impl Default for IntegrationBenchmarkSuite {
    fn default() -> Self {
        Self::new()
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_benchmark_result_creation() {
        let result =
            BenchmarkResult::new("Test Benchmark".to_string(), 1000, Duration::from_secs(1));

        assert_eq!(result.operations, 1000);
        assert!(result.ops_per_sec > 900.0); // Allow for some timing variance
    }

    #[test]
    fn test_benchmark_suite_creation() {
        let suite = IntegrationBenchmarkSuite::new();
        assert_eq!(suite.results.len(), 0);
    }

    #[test]
    fn test_sparql_direct_query_benchmark() -> Result<(), Box<dyn std::error::Error>> {
        let mut suite = IntegrationBenchmarkSuite::new();
        suite.benchmark_sparql_direct_query(10)?;

        assert_eq!(suite.results.len(), 1);
        assert_eq!(suite.results[0].operations, 10);
        Ok(())
    }

    #[test]
    fn test_shacl_validation_benchmark() -> Result<(), Box<dyn std::error::Error>> {
        let mut suite = IntegrationBenchmarkSuite::new();
        suite.benchmark_shacl_direct_validation(10)?;

        assert_eq!(suite.results.len(), 1);
        assert_eq!(suite.results[0].operations, 10);
        Ok(())
    }

    #[test]
    fn test_distributed_benchmark() -> Result<(), Box<dyn std::error::Error>> {
        let mut suite = IntegrationBenchmarkSuite::new();
        suite.benchmark_distributed_round_robin(5)?;

        assert_eq!(suite.results.len(), 1);
        assert_eq!(suite.results[0].operations, 5);
        Ok(())
    }

    #[test]
    fn test_module_registration_benchmark() -> Result<(), Box<dyn std::error::Error>> {
        let mut suite = IntegrationBenchmarkSuite::new();
        suite.benchmark_module_registration(10)?;

        assert_eq!(suite.results.len(), 1);
        assert_eq!(suite.results[0].operations, 10);
        Ok(())
    }
}