Commit 3856539
committed
optimize line probe without condition
In case of a line probe without condition we can move the sampling is
currently done in LogProbe::evaluate to LogProbe::isReadToCapture.
This way if the sample fails we return false on isReadyTocapture
and no CapturedContext is created and nothing captured.
If we sample the execution the CapturedContext will be created
we capture the context and seiralize the result, but we are sure that
we are not doing for nothing.1 parent 33e27c7 commit 3856539
File tree
2 files changed
+12
-2
lines changed- dd-java-agent/agent-debugger/src
- main/java/com/datadog/debugger/probe
- test/java/com/datadog/debugger/probe
2 files changed
+12
-2
lines changedLines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
| |||
494 | 498 | | |
495 | 499 | | |
496 | 500 | | |
497 | | - | |
498 | 501 | | |
499 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
500 | 509 | | |
501 | 510 | | |
502 | 511 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| |||
0 commit comments