haglin
Joined 9 years ago
Joined 9 years ago
$ java -XX:StartFlightRecording:maxsize=10M,filename=dump.jfr -jar app.jar
$ jfr view all-views dump.jfr > report.txt
$ jfr print dump.jfr > all.txt
Then ask Codex, or whatever AI tool you use, to analyze report.txt for issues and use all.txt to dig deeper, if needed.What each color means would depend on the PR, but, for instance, yellow = refactoring, brown = test code, blue = drive-by fix, orange = more efficient data structure etc.
The colors and their meanings could be set by either the author or the reviewers. It would be similar to the file checkboxes that exist today, but in this case, it would be per concept, not per file.
In hindsight, the progress Microsoft made in the ten years between Windows 3.0 (1990) and Windows 2000 seems incredible. They transitioned from a 16-bit shell running on top of DOS to a fully-fledged operating system with a hardware abstraction layer, preemptive multitasking, permissions, a registry, proper device drivers etc.
Twenty-five years later, there has been basically no progress.
At a minimum, I would have expected something like the Knowledge Navigator
"Launch Single-File Source-Code Programs" https://openjdk.org/jeps/330
I would guess at least some of the bottlenecks are in hardware, the operating system or in native code (including the JVM) in this case.
FWIW, nullity control has been added to the Valhalla project, so it might be fixed going forward.
The reason I now use gmail and not hotmail is because Microsoft did a similar thing 20 years ago. When I lost my hotmail account, I thought I might as well use gmail from now on. Reason I didn't log into my hotmail account was because I used the mail address I got from the university.
var r = new RecordingStream();
r.enable("jdk.ExecutionSample").withStackTrace().withPeriod(Duration.ofMillis(1));
r.onEvent("jdk.ExecutionSample", e -> {
store.addSample(e.getStackTrace().getFrames());
});
r.startAsync();
...1) an empty list/array 2) throw an exception if the return value is missing. 3) -1
Optional can be used as a better alternative in all these cases. It's not just null.
"But as long as your system isn’t heavily over-provisioned, you can expect to see average GC pause times of around 0.05ms (50µs) and max pause times of around 0.5ms (500µs)." https://malloc.se/blog/zgc-jdk16
That's my experience as well.
AI does a decent job of reviewing and finding bugs, but it has no concept of what makes code good or bad - too much state, convoluted logic, no invariants, unnecessary methods, poorly defined abstractions, not relying on fail-fast etc.
It's similar to work from a junior developer with little experience maintaining code over a longer period of time.