Skip to content

Report bytes written per operation - #38

Merged
venkat1701 merged 3 commits into
mainfrom
feat/bench-bytes-written
Oct 4, 2026
Merged

venkat1701 merged 3 commits into
mainfrom
feat/bench-bytes-written

Conversation

@venkat1701

Copy link
Copy Markdown
Collaborator

Closes #30

Both engines already count what they write, so the adapters just read those counters:

  • HStore: walBytes + dataBytesWritten from EngineStats, which includes pages moved by compaction
  • HyperGraphDB: getNSequentialWriteBytes() + getNRandomWriteBytes() from JE's EnvironmentStats, which includes the log cleaner

The write workloads (ingest, updates, single commits, the large edge) record the difference before and after. Each one flushes after its timed section, with an HStore checkpoint or Environment.sync(), so buffered bytes count against the right workload and throughput isn't affected. The counters restart on reopen, so both adapters carry the total across it. The run also stores the overall total in the header.

The report gets a Resources table with bytes per operation, plus the total. Older result files render unchanged.

Smoke run at scale 1, async, one run each on a loaded machine:

Workload HStore HyperGraphDB
ingest.nodes 709 B 1.0 KiB
ingest.edges 1.6 KiB 2.0 KiB
write.update 1.8 KiB 3.7 KiB
latency.commit 20.7 KiB 3.4 KiB
large.ingest 66 B 921 B

Total for the run: 325.7 MiB for HStore, 548.9 MiB for HyperGraphDB.

The latency.commit line goes with what #37 found: a single-update commit in HStore writes about 20 KiB, so the fixed cost of each commit is high. Probably the copy-on-write path in every tree the commit touches. I'll look at that separately.

Both adapters read the engine's own write counters: WAL and page bytes
for HStore, JE's sequential and random write bytes for HyperGraphDB.
Write workloads flush after their timed section so buffered bytes land
on the right workload, and the run records the total at the end.
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.

Benchmark doesn't measure bytes written

1 participant