-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to request stats for a Vat. #411
Conversation
32b77a5
to
f7c09eb
Compare
d868b10
to
cce79bf
Compare
b159f74
to
ea444f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, although the registerVatCreationFunction
bit might need to change if you adopt the endowments change I suggested in the earlier PR
@@ -507,6 +507,15 @@ export default function makeKernelKeeper(storage) { | |||
}); | |||
} | |||
|
|||
function vatStats(vatID) { | |||
return harden({ | |||
nextObjectId: storage.get(`${vatID}.o.nextID`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these want to be Nat(Number(xx))
instead of strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea.
ac545fc
to
77820e3
Compare
Changes from a previous version: * Subtract the starting index to give counts * ask the vat manager rather than the kernelKeeper. remaining question: is the serialized object containing stats safe, or should it be turned into text?
ea444f3
to
42291ad
Compare
Adds collectVatStats and registers it with the device. Returns some basic stats about a vat.
The base change for the vatAdmin changes is here. See this discussion for context.