Commit 9f610f9
committed
TagMap that can "mostly" be toggled on / off
Changes TagMap to be an interface with two distinct implementations:
- One that extends HashMap
- One that implements the new map structure
Next change will make it possible to switch between the map implementations via configuration
To try and make both TagMap implementations reasonably efficient, added a more method variations:
- set methods now return void to avoid Entry creation for HashMap implementation
- getAndSet - replaces set for the add cases where the previous Entry is needed
- remove(String) - now returns a boolean to indicate that a change happened rather than returning the value or entry
- getAndRemove - returns an Entry
Many TagMapTest and TagMapLedgerTest have been parameterized to test both implementations of TagMaps
Updated calling code & other tests as needed1 parent 8612213 commit 9f610f9
File tree
18 files changed
+2259
-1516
lines changed- dd-java-agent
- agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator
- agent-debugger/src/test/java/com/datadog/debugger/exception
- appsec/src/test/groovy/com/datadog/appsec/gateway
- dd-trace-core/src
- main/java/datadog/trace/core
- tagprocessor
- test/groovy/datadog/trace/core/datastreams
- internal-api/src
- main/java/datadog/trace
- api
- bootstrap/instrumentation/api
- test/java/datadog/trace/api
18 files changed
+2259
-1516
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
992 | | - | |
| 992 | + | |
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | | - | |
| 1891 | + | |
1892 | 1892 | | |
1893 | 1893 | | |
1894 | 1894 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
346 | 349 | | |
347 | 350 | | |
348 | 351 | | |
| |||
772 | 775 | | |
773 | 776 | | |
774 | 777 | | |
775 | | - | |
| 778 | + | |
776 | 779 | | |
777 | 780 | | |
778 | 781 | | |
| |||
790 | 793 | | |
791 | 794 | | |
792 | 795 | | |
793 | | - | |
| 796 | + | |
794 | 797 | | |
795 | 798 | | |
796 | 799 | | |
797 | 800 | | |
798 | 801 | | |
799 | 802 | | |
800 | 803 | | |
801 | | - | |
| 804 | + | |
802 | 805 | | |
803 | 806 | | |
804 | 807 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 9 | | |
| 10 | + | |
12 | 11 | | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
457 | | - | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
552 | | - | |
| 553 | + | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3657 | 3657 | | |
3658 | 3658 | | |
3659 | 3659 | | |
3660 | | - | |
3661 | | - | |
3662 | | - | |
| 3660 | + | |
3663 | 3661 | | |
3664 | 3662 | | |
3665 | 3663 | | |
| |||
0 commit comments