modus
Menu
On this page

The entry hierarchy

A test of the trees of a store: many entries in trees inside trees, a listing in pages, a rename, the removal of a tree, and a handle on a part of the store that reaches nothing outside it.

The first run (an empty store) makes 100 trees of 10 trees of 100 objects, one commit for each 100 entries, and checks each case. The second run, on the same disk after a new start of the machine, checks the counts and the contents that the first run left. Each case ends with a line "...: as it must", or a line "...: WRONG". The times are measures: no case checks a speed.

What it is for. It checks that a store holds a large tree of entries across a restart of the machine, and that a handle on a part of the store reaches nothing outside that part. A process sees only its private store; inside it, a tree is the unit that a process lends to a part of itself.

What a reader sees. It has no window and no menu line: the machine test starts it with start("hierarchy") on a machine with a data disk, two times. Each case writes one log fact of its own type, hierarchy: <case>: as it must, or hierarchy: <case>: WRONG at the level error; where(verdict = "WRONG") keeps the cases that failed. The first run writes hierarchy: a new store: the first run, and the time to make the 100 000 objects.

Its grant: Store, its private store in the storage service.

See: Storage

hierarchy module with an entry

Hash
e18b6b84f72f4e58ecb8edfc41e69b565c70b57777e028873cd660ec18d6bdb7
Size
106496 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

A test of the trees of a store: many entries in trees inside trees, a listing in pages, a rename, the removal of a tree, and a handle on a part of the store that reaches nothing outside it

FactValue
KindModules with an entry
Sourcesrc/modules/tests/hierarchy
Boot imageyes: in the boot image, 106496 bytes in this build
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
entry()connects to the private store and reads its usage

entry

entry()

entry connects to the private store and reads its usage. On an empty store it runs the first run: it makes the trees, then checks each case. On a store that the first run filled it runs the second run: it checks the counts and the contents. Each case writes its line on the log. The process then stops with Done when each case held, else with Failed. With no store or no usage, it writes hierarchy: WRONG: no store (or no usage) at the level error, and stops with Failed.

Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/tests/hierarchy/main.odin:556

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsThe test of the trees of a store: 100000 empty objects in 1110 trees, about 9500 nodes, and room for the copies of a commit.
Other terms of its start grant setstore_blocks = 12000
Budget that it asks for
  • the least budget
No MODULE_BUDGET in its source: it asks for the least budget.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module; the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).