-
Notifications
You must be signed in to change notification settings - Fork 312
Improve OS type and architecture detection #9637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
20832f9
to
d3d3b84
Compare
🎯 Code Coverage 🔗 Commit SHA: 35e0bc2 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1020570
Total [baseline] (8.63 s) : 0, 8630000
Agent [candidate] (1.013 s) : 0, 1013008
Total [candidate] (8.653 s) : 0, 8653498
section iast
Agent [baseline] (1.153 s) : 0, 1153313
Total [baseline] (9.255 s) : 0, 9254521
Agent [candidate] (1.151 s) : 0, 1150941
Total [candidate] (9.232 s) : 0, 9231899
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.494 ms) : 0, 1494
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (695.998 ms) : 0, 695998
BytebuddyAgent [candidate] (690.96 ms) : 0, 690960
GlobalTracer [baseline] (244.546 ms) : 0, 244546
GlobalTracer [candidate] (242.767 ms) : 0, 242767
AppSec [baseline] (31.339 ms) : 0, 31339
AppSec [candidate] (31.201 ms) : 0, 31201
Debugger [baseline] (6.369 ms) : 0, 6369
Debugger [candidate] (6.295 ms) : 0, 6295
Remote Config [baseline] (683.077 µs) : 0, 683
Remote Config [candidate] (662.458 µs) : 0, 662
Telemetry [baseline] (9.207 ms) : 0, 9207
Telemetry [candidate] (8.998 ms) : 0, 8998
Flare Poller [baseline] (9.637 ms) : 0, 9637
Flare Poller [candidate] (9.572 ms) : 0, 9572
section iast
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (817.498 ms) : 0, 817498
BytebuddyAgent [candidate] (815.323 ms) : 0, 815323
GlobalTracer [baseline] (233.421 ms) : 0, 233421
GlobalTracer [candidate] (233.194 ms) : 0, 233194
IAST [baseline] (26.375 ms) : 0, 26375
IAST [candidate] (26.51 ms) : 0, 26510
AppSec [baseline] (33.833 ms) : 0, 33833
AppSec [candidate] (34.169 ms) : 0, 34169
Debugger [baseline] (6.075 ms) : 0, 6075
Debugger [candidate] (6.039 ms) : 0, 6039
Remote Config [baseline] (592.181 µs) : 0, 592
Remote Config [candidate] (586.328 µs) : 0, 586
Telemetry [baseline] (8.312 ms) : 0, 8312
Telemetry [candidate] (8.188 ms) : 0, 8188
Flare Poller [baseline] (4.24 ms) : 0, 4240
Flare Poller [candidate] (4.184 ms) : 0, 4184
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.019 s) : 0, 1019492
Total [baseline] (10.69 s) : 0, 10690449
Agent [candidate] (1.014 s) : 0, 1014191
Total [candidate] (10.705 s) : 0, 10704867
section appsec
Agent [baseline] (1.196 s) : 0, 1196189
Total [baseline] (11.035 s) : 0, 11035204
Agent [candidate] (1.187 s) : 0, 1187472
Total [candidate] (11.091 s) : 0, 11091367
section iast
Agent [baseline] (1.149 s) : 0, 1149113
Total [baseline] (10.933 s) : 0, 10932765
Agent [candidate] (1.147 s) : 0, 1146877
Total [candidate] (10.936 s) : 0, 10936259
section profiling
Agent [baseline] (1.157 s) : 0, 1157498
Total [baseline] (11.112 s) : 0, 11111756
Agent [candidate] (1.155 s) : 0, 1154977
Total [candidate] (11.051 s) : 0, 11050916
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (694.658 ms) : 0, 694658
BytebuddyAgent [candidate] (690.303 ms) : 0, 690303
GlobalTracer [baseline] (244.662 ms) : 0, 244662
GlobalTracer [candidate] (242.578 ms) : 0, 242578
AppSec [baseline] (31.539 ms) : 0, 31539
AppSec [candidate] (31.237 ms) : 0, 31237
Debugger [baseline] (6.398 ms) : 0, 6398
Debugger [candidate] (6.326 ms) : 0, 6326
Remote Config [baseline] (689.318 µs) : 0, 689
Remote Config [candidate] (691.71 µs) : 0, 692
Telemetry [baseline] (9.148 ms) : 0, 9148
Telemetry [candidate] (8.944 ms) : 0, 8944
Flare Poller [baseline] (9.604 ms) : 0, 9604
Flare Poller [candidate] (11.521 ms) : 0, 11521
section appsec
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (719.704 ms) : 0, 719704
BytebuddyAgent [candidate] (713.907 ms) : 0, 713907
GlobalTracer [baseline] (236.244 ms) : 0, 236244
GlobalTracer [candidate] (234.812 ms) : 0, 234812
AppSec [baseline] (173.379 ms) : 0, 173379
AppSec [candidate] (171.774 ms) : 0, 171774
Debugger [baseline] (6.082 ms) : 0, 6082
Debugger [candidate] (6.004 ms) : 0, 6004
Remote Config [baseline] (631.114 µs) : 0, 631
Remote Config [candidate] (625.181 µs) : 0, 625
Telemetry [baseline] (8.322 ms) : 0, 8322
Telemetry [candidate] (9.126 ms) : 0, 9126
Flare Poller [baseline] (3.999 ms) : 0, 3999
Flare Poller [candidate] (3.995 ms) : 0, 3995
IAST [baseline] (25.189 ms) : 0, 25189
IAST [candidate] (24.7 ms) : 0, 24700
section iast
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (813.409 ms) : 0, 813409
BytebuddyAgent [candidate] (811.797 ms) : 0, 811797
GlobalTracer [baseline] (232.942 ms) : 0, 232942
GlobalTracer [candidate] (232.5 ms) : 0, 232500
AppSec [baseline] (33.267 ms) : 0, 33267
AppSec [candidate] (34.27 ms) : 0, 34270
Debugger [baseline] (6.105 ms) : 0, 6105
Debugger [candidate] (6.11 ms) : 0, 6110
Remote Config [baseline] (590.856 µs) : 0, 591
Remote Config [candidate] (594.303 µs) : 0, 594
Telemetry [baseline] (8.256 ms) : 0, 8256
Telemetry [candidate] (8.287 ms) : 0, 8287
Flare Poller [baseline] (4.251 ms) : 0, 4251
Flare Poller [candidate] (4.264 ms) : 0, 4264
IAST [baseline] (27.348 ms) : 0, 27348
IAST [candidate] (26.406 ms) : 0, 26406
section profiling
ProfilingAgent [baseline] (103.827 ms) : 0, 103827
ProfilingAgent [candidate] (102.045 ms) : 0, 102045
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.419 ms) : 0, 1419
BytebuddyAgent [baseline] (721.714 ms) : 0, 721714
BytebuddyAgent [candidate] (721.172 ms) : 0, 721172
GlobalTracer [baseline] (218.42 ms) : 0, 218420
GlobalTracer [candidate] (218.682 ms) : 0, 218682
AppSec [baseline] (31.62 ms) : 0, 31620
AppSec [candidate] (31.354 ms) : 0, 31354
Debugger [baseline] (6.558 ms) : 0, 6558
Debugger [candidate] (7.337 ms) : 0, 7337
Remote Config [baseline] (806.283 µs) : 0, 806
Remote Config [candidate] (729.624 µs) : 0, 730
Telemetry [baseline] (15.56 ms) : 0, 15560
Telemetry [candidate] (15.796 ms) : 0, 15796
Flare Poller [baseline] (4.923 ms) : 0, 4923
Flare Poller [candidate] (4.182 ms) : 0, 4182
Profiling [baseline] (104.418 ms) : 0, 104418
Profiling [candidate] (102.634 ms) : 0, 102634
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (4.428 ms) : 4373, 4484
. : milestone, 4428,
iast (9.838 ms) : 9674, 10001
. : milestone, 9838,
iast_FULL (14.947 ms) : 14649, 15246
. : milestone, 14947,
iast_GLOBAL (11.036 ms) : 10837, 11236
. : milestone, 11036,
profiling (8.918 ms) : 8781, 9055
. : milestone, 8918,
tracing (7.923 ms) : 7809, 8037
. : milestone, 7923,
section candidate
no_agent (4.287 ms) : 4234, 4340
. : milestone, 4287,
iast (9.949 ms) : 9775, 10123
. : milestone, 9949,
iast_FULL (15.0 ms) : 14700, 15301
. : milestone, 15000,
iast_GLOBAL (10.98 ms) : 10780, 11180
. : milestone, 10980,
profiling (8.904 ms) : 8768, 9040
. : milestone, 8904,
tracing (7.883 ms) : 7762, 8003
. : milestone, 7883,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (38.179 ms) : 37881, 38477
. : milestone, 38179,
appsec (49.409 ms) : 48969, 49850
. : milestone, 49409,
code_origins (44.999 ms) : 44602, 45396
. : milestone, 44999,
iast (46.72 ms) : 46323, 47118
. : milestone, 46720,
profiling (50.193 ms) : 49709, 50676
. : milestone, 50193,
tracing (45.644 ms) : 45247, 46042
. : milestone, 45644,
section candidate
no_agent (37.93 ms) : 37633, 38227
. : milestone, 37930,
appsec (47.922 ms) : 47509, 48334
. : milestone, 47922,
code_origins (43.065 ms) : 42702, 43429
. : milestone, 43065,
iast (44.941 ms) : 44530, 45353
. : milestone, 44941,
profiling (50.075 ms) : 49605, 50544
. : milestone, 50075,
tracing (44.767 ms) : 44382, 45152
. : milestone, 44767,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1472, 1496
. : milestone, 1484,
appsec (3.728 ms) : 3508, 3948
. : milestone, 3728,
iast (2.217 ms) : 2153, 2281
. : milestone, 2217,
iast_GLOBAL (2.271 ms) : 2207, 2335
. : milestone, 2271,
profiling (2.084 ms) : 2032, 2137
. : milestone, 2084,
tracing (2.05 ms) : 2000, 2100
. : milestone, 2050,
section candidate
no_agent (1.49 ms) : 1479, 1502
. : milestone, 1490,
appsec (2.481 ms) : 2430, 2532
. : milestone, 2481,
iast (2.224 ms) : 2160, 2287
. : milestone, 2224,
iast_GLOBAL (2.265 ms) : 2201, 2329
. : milestone, 2265,
profiling (2.067 ms) : 2016, 2118
. : milestone, 2067,
tracing (2.046 ms) : 1997, 2096
. : milestone, 2046,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~35e0bc207f, baseline=1.54.0-SNAPSHOT~450f7b5139
dateFormat X
axisFormat %s
section baseline
no_agent (15.572 s) : 15572000, 15572000
. : milestone, 15572000,
appsec (15.139 s) : 15139000, 15139000
. : milestone, 15139000,
iast (18.425 s) : 18425000, 18425000
. : milestone, 18425000,
iast_GLOBAL (17.867 s) : 17867000, 17867000
. : milestone, 17867000,
profiling (15.285 s) : 15285000, 15285000
. : milestone, 15285000,
tracing (15.241 s) : 15241000, 15241000
. : milestone, 15241000,
section candidate
no_agent (15.353 s) : 15353000, 15353000
. : milestone, 15353000,
appsec (15.043 s) : 15043000, 15043000
. : milestone, 15043000,
iast (18.457 s) : 18457000, 18457000
. : milestone, 18457000,
iast_GLOBAL (17.68 s) : 17680000, 17680000
. : milestone, 17680000,
profiling (15.516 s) : 15516000, 15516000
. : milestone, 15516000,
tracing (15.079 s) : 15079000, 15079000
. : milestone, 15079000,
|
d3d3b84
to
d1f4a79
Compare
316fdab
to
ca41005
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change look good, however I do have a suggestion about using the notion of Platform
.
public final class OperatingSystem { | ||
private static final String OS_NAME_PROPERTY = "os.name"; | ||
private static final String OS_ARCH_PROPERTY = "os.arch"; | ||
private static final Type TYPE = Type.current(); | ||
private static final Architecture ARCHITECTURE = Architecture.current(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Thinking about this, what about renaming OperatingSystem
to Platform
, and Type
to OS
(or OperatingSystem
) ?
The reason for this naeing change is that architecture is not really a property of the operating system. I believe that using the notion of platform is much more close to the native world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially design the arch outside the OperatingSystem
. But I rely on os.arch
property, I moved is in OperatingSystem
.
/** Detects the operating system architecture. */ | ||
public enum Architecture { | ||
X64("x86_64", "amd64", "k8"), | ||
X86("x86", "i386", "i486", "i586", "i686"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Out of curiosity as I didn't followed what Intel did these last years, is there later architectures, if that matter for us ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should ask to profiling about it. This PR is only code relocation.
when: | ||
System.setProperty("os.name", osName) | ||
def args = TraceStructureWriter.parseArgs(cli) | ||
def args = TraceStructureWriter.parseArgs(cli, windows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: now parseArgs is not really about the OS, but about handling "unix style paths", maybe the arg can reflect ?
Maybe WSL on Windows accept unix path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the arg can reflect ?
Sorry I did not get it. What the arg should reflect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for miswriting this, I meant it as the arg could be renamed instead to isUnixPath
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay, I get it now 😅
ca41005
to
35e0bc2
Compare
What Does This Do
This PR improve the operating system type and architecture from the environment component.
Motivation
Reuse common behavior. In particular related to #9625
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any useful labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]