Skip to content

Add VM start in terms of nanoTime() to the CSV and JSON outputs#469

Merged
lbulej merged 4 commits intomasterfrom
issue/468
Mar 28, 2025
Merged

Add VM start in terms of nanoTime() to the CSV and JSON outputs#469
lbulej merged 4 commits intomasterfrom
issue/468

Conversation

@lbulej
Copy link
Copy Markdown
Member

@lbulej lbulej commented Mar 27, 2025

The value is stored as vm_start_ns in the CSV output and vm.start_ns in the JSON output. It has no official semantics (unlike vm_start_unix_ms), but allows recovering the nanoTime() value associated with the vm_start_unix_ms value. It also bumps the JSON format version to 6.

BTW, only the last commit is the important one, the others are things that I had lying around for quite some time and thought to sneak them in.

Closes #468

lbulej added 4 commits March 27, 2025 18:30
The UnixOperatingSystemMXBean class is only needed to get info related
to file descriptors.
The value is stored as 'vm_start_ns' in the CSV output and 'vm.start_ns'
in the JSON output. It has no official semantics (unlike
'vm_start_unix_ms'), but allows recovering the nanoTime() value
associated with the 'vm_start_unix_ms' value.
@lbulej lbulej assigned lbulej and unassigned lbulej Mar 27, 2025
@lbulej lbulej requested a review from ceresek March 27, 2025 17:43
Copy link
Copy Markdown
Collaborator

@ceresek ceresek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks !

I kinda expected you to come up with some sort of SystemInfo container that would be used to ship information like vmStartNano to the result writers, or even be available as a singleton ... this looks ... just ... straightforward :-)

@lbulej
Copy link
Copy Markdown
Member Author

lbulej commented Mar 28, 2025

I kinda expected you to come up with some sort of SystemInfo container that would be used to ship information like vmStartNano to the result writers, or even be available as a singleton ... this looks ... just ... straightforward :-)

I thought along those lines, but I realized that so far, we just need to pass a single "special" value (that the writers cannot easily get themselves if they are to have the same value).

The writers are independent of each other and with the harness being the sole user and owner of their interfaces, we decide how the interface looks like. If it turns out that we need to provide the writers with more (static) information like this, or if we create another writer that would duplicate the MBean queries the JSON writer does, we can easily change the interface to accept some sort of system info provider. Also, I understood that the sooner this is supported the better :-)

@lbulej lbulej merged commit da783f1 into master Mar 28, 2025
19 checks passed
@lbulej lbulej deleted the issue/468 branch March 28, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save vmStartNanos into (JSON) output

2 participants