You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dd-java-agent/instrumentation/spark/spark-common/src/main/java/datadog/trace/instrumentation/spark/SparkAggregatedTaskMetrics.java
Copy file name to clipboardExpand all lines: dd-java-agent/instrumentation/spark/spark-common/src/testFixtures/groovy/datadog/trace/instrumentation/spark/AbstractSpark24SqlTest.groovy
+37-1Lines changed: 37 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
157
157
158
158
assert expectedMetric.size() == actualMetric.size(): prefix +"metric size of $expectedMetric does not match $actualMetric"
159
159
160
-
// Each metric is a dict { "metric_name": "metric_value", "type": "metric_type" }
160
+
// Each metric is a dict { "metric_name": "metric_value", "type": "metric_type", "sum": "metric_sum" }
161
161
expectedMetric.each { key, expectedValue->
162
162
assert actualMetric.containsKey(key): prefix +"metric key \"$key\" not found in $actualMetric.\n\tactual: $actual.metrics, \n\texpected: $expected.metrics"
163
163
@@ -259,6 +259,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
259
259
"metrics": [
260
260
{
261
261
"data size total (min, med, max)": "any",
262
+
"sum": "any",
262
263
"type": "size"
263
264
}
264
265
],
@@ -270,6 +271,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
270
271
"metrics": [
271
272
{
272
273
"duration total (min, med, max)": "any",
274
+
"sum": "any",
273
275
"type": "timing"
274
276
}
275
277
],
@@ -290,22 +292,27 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
290
292
"metrics": [
291
293
{
292
294
"aggregate time total (min, med, max)": "any",
295
+
"sum": "any",
293
296
"type": "timing"
294
297
},
295
298
{
296
299
"number of output rows": "any",
300
+
"sum": "any",
297
301
"type": "sum"
298
302
},
299
303
{
300
304
"avg hash probe (min, med, max)": "any",
305
+
"sum": "any",
301
306
"type": "average"
302
307
},
303
308
{
304
309
"peak memory total (min, med, max)": "any",
310
+
"sum": "any",
305
311
"type": "size"
306
312
},
307
313
{
308
314
"spill size total (min, med, max)": "any",
315
+
"sum": "any",
309
316
"type": "size"
310
317
}
311
318
],
@@ -326,6 +333,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
326
333
"metrics": [
327
334
{
328
335
"number of output rows": "CgkJCCGEEEII8T8SZBJgAAAAAAAA8D8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA/GAAaAA==",
336
+
"sum": 3,
329
337
"type": "sum"
330
338
}
331
339
]
@@ -348,6 +356,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
348
356
"metrics": [
349
357
{
350
358
"duration total (min, med, max)": "any",
359
+
"sum": "any",
351
360
"type": "timing"
352
361
}
353
362
],
@@ -368,22 +377,27 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
368
377
"metrics": [
369
378
{
370
379
"aggregate time total (min, med, max)": "any",
380
+
"sum": "any",
371
381
"type": "timing"
372
382
},
373
383
{
374
384
"avg hash probe (min, med, max)": "any",
385
+
"sum": "any",
375
386
"type": "average"
376
387
},
377
388
{
378
389
"number of output rows": "CgkJCCGEEEII8T8SDBIIAAAAAAAA8D8YFhoAIQAAAAAAAPA/",
390
+
"sum": 2,
379
391
"type": "sum"
380
392
},
381
393
{
382
394
"peak memory total (min, med, max)": "any",
395
+
"sum": "any",
383
396
"type": "size"
384
397
},
385
398
{
386
399
"spill size total (min, med, max)": "any",
400
+
"sum": "any",
387
401
"type": "size"
388
402
}
389
403
],
@@ -473,6 +487,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
473
487
"metrics": [
474
488
{
475
489
"data size total (min, med, max)": "any",
490
+
"sum": "any",
476
491
"type": "size"
477
492
}
478
493
],
@@ -488,6 +503,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
488
503
"metrics": [
489
504
{
490
505
"number of output rows": "any",
506
+
"sum": "any",
491
507
"type": "sum"
492
508
}
493
509
]
@@ -513,6 +529,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
513
529
"metrics": [
514
530
{
515
531
"data size total (min, med, max)": "any",
532
+
"sum": "any",
516
533
"type": "size"
517
534
}
518
535
],
@@ -528,6 +545,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
528
545
"metrics": [
529
546
{
530
547
"number of output rows": "any",
548
+
"sum": "any",
531
549
"type": "sum"
532
550
}
533
551
]
@@ -548,6 +566,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
548
566
"metrics": [
549
567
{
550
568
"data size total (min, med, max)": "any",
569
+
"sum": "any",
551
570
"type": "size"
552
571
}
553
572
],
@@ -559,6 +578,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
559
578
"metrics": [
560
579
{
561
580
"duration total (min, med, max)": "any",
581
+
"sum": "any",
562
582
"type": "timing"
563
583
}
564
584
],
@@ -579,22 +599,27 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
579
599
"metrics": [
580
600
{
581
601
"aggregate time total (min, med, max)": "any",
602
+
"sum": "any",
582
603
"type": "timing"
583
604
},
584
605
{
585
606
"number of output rows": "any",
607
+
"sum": "any",
586
608
"type": "sum"
587
609
},
588
610
{
589
611
"spill size total (min, med, max)": "any",
612
+
"sum": "any",
590
613
"type": "size"
591
614
},
592
615
{
593
616
"avg hash probe (min, med, max)": "any",
617
+
"sum": "any",
594
618
"type": "average"
595
619
},
596
620
{
597
621
"peak memory total (min, med, max)": "any",
622
+
"sum": "any",
598
623
"type": "size"
599
624
}
600
625
],
@@ -621,6 +646,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
621
646
"metrics": [
622
647
{
623
648
"number of output rows": "any",
649
+
"sum": "any",
624
650
"type": "sum"
625
651
}
626
652
],
@@ -637,6 +663,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
637
663
"metrics": [
638
664
{
639
665
"duration total (min, med, max)": "any",
666
+
"sum": "any",
640
667
"type": "timing"
641
668
}
642
669
],
@@ -654,14 +681,17 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
654
681
"metrics": [
655
682
{
656
683
"spill size total (min, med, max)": "any",
684
+
"sum": "any",
657
685
"type": "size"
658
686
},
659
687
{
660
688
"peak memory total (min, med, max)": "any",
689
+
"sum": "any",
661
690
"type": "size"
662
691
},
663
692
{
664
693
"sort time total (min, med, max)": "any",
694
+
"sum": "any",
665
695
"type": "timing"
666
696
}
667
697
],
@@ -689,6 +719,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
689
719
"metrics": [
690
720
{
691
721
"duration total (min, med, max)": "any",
722
+
"sum": "any",
692
723
"type": "timing"
693
724
}
694
725
],
@@ -706,14 +737,17 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
706
737
"metrics": [
707
738
{
708
739
"spill size total (min, med, max)": "any",
740
+
"sum": "any",
709
741
"type": "size"
710
742
},
711
743
{
712
744
"peak memory total (min, med, max)": "any",
745
+
"sum": "any",
713
746
"type": "size"
714
747
},
715
748
{
716
749
"sort time total (min, med, max)": "any",
750
+
"sum": "any",
717
751
"type": "timing"
718
752
}
719
753
],
@@ -748,6 +782,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
748
782
"metrics": [
749
783
{
750
784
"duration total (min, med, max)": "any",
785
+
"sum": "any",
751
786
"type": "timing"
752
787
}
753
788
],
@@ -768,6 +803,7 @@ abstract class AbstractSpark24SqlTest extends InstrumentationSpecification {
768
803
"metrics": [
769
804
{
770
805
"number of output rows": "CgkJCCGEEEII8T8SDBIIAAAAAAAA8D8YABoA",
0 commit comments