nio2: NIO.2 file API companion code (streaming 5 GB at -Xmx64m, handle leaks, WatchService, mmap)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqJyCidz3ZgRyHABv2GVJh
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
1. create a file, write it twice, delete it (events polled afterwards):
|
||||
ENTRY_CREATE count=1 context=a.txt
|
||||
ENTRY_MODIFY count=2 context=a.txt
|
||||
ENTRY_DELETE count=1 context=a.txt
|
||||
2. Files.writeString of 100 KiB to a new file (one call):
|
||||
ENTRY_CREATE count=1 context=b.txt
|
||||
ENTRY_MODIFY count=1 context=b.txt
|
||||
3. 50 appends to one file with no polling in between, then poll:
|
||||
{(batches)=1, ENTRY_MODIFY=9}
|
||||
4. Files.move (atomic rename) of g.txt to h.txt:
|
||||
ENTRY_DELETE count=1 context=g.txt
|
||||
ENTRY_CREATE count=1 context=h.txt
|
||||
5. a file created inside a NEW subdirectory (subdirectory not registered):
|
||||
ENTRY_CREATE count=1 context=sub
|
||||
6. burst: create N empty files in a fresh directory before polling once (jdk.nio.file.WatchService.maxEventsPerPoll=default):
|
||||
N=100 delivered 100 events: ENTRY_CREATE=100 OVERFLOW(count)=0, files on disk=100
|
||||
N=512 delivered 512 events: ENTRY_CREATE=512 OVERFLOW(count)=0, files on disk=512
|
||||
N=513 delivered 1 events: ENTRY_CREATE=0 OVERFLOW(count)=1, files on disk=513
|
||||
N=5000 delivered 1 events: ENTRY_CREATE=0 OVERFLOW(count)=4488, files on disk=5000
|
||||
Reference in New Issue
Block a user