mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
updated
This commit is contained in:
parent
4577763bca
commit
043ddf29f1
1 changed files with 2 additions and 5 deletions
|
@ -146,7 +146,6 @@ public class OwnerValidation {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithSpan
|
|
||||||
public boolean checkOwnerValidity(Owner owner) {
|
public boolean checkOwnerValidity(Owner owner) {
|
||||||
|
|
||||||
this.ValidateOwnerUserBad(owner);
|
this.ValidateOwnerUserBad(owner);
|
||||||
|
@ -158,7 +157,7 @@ public class OwnerValidation {
|
||||||
private boolean ValidateOwnerUserBad(Owner owner) {
|
private boolean ValidateOwnerUserBad(Owner owner) {
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 120; i++) {
|
||||||
ValidateOwner();
|
ValidateOwner();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -166,12 +165,11 @@ public class OwnerValidation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithSpan
|
|
||||||
private boolean ValidateOwnerUser(Owner owner) {
|
private boolean ValidateOwnerUser(Owner owner) {
|
||||||
|
|
||||||
Span span = otelTracer.spanBuilder("db_access_01").startSpan();
|
Span span = otelTracer.spanBuilder("db_access_01").startSpan();
|
||||||
|
|
||||||
var max = ThreadLocalRandom.current().nextInt(90, 110 + 1);
|
int max = ThreadLocalRandom.current().nextInt(90, 110 + 1);
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < max; i++) {
|
for (int i = 0; i < max; i++) {
|
||||||
ValidateOwner();
|
ValidateOwner();
|
||||||
|
@ -184,7 +182,6 @@ public class OwnerValidation {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@WithSpan
|
|
||||||
private void ValidateOwner() {
|
private void ValidateOwner() {
|
||||||
// simulate SpanKind of DB query
|
// simulate SpanKind of DB query
|
||||||
// see
|
// see
|
||||||
|
|
Loading…
Reference in a new issue