Skip to content

Commit

Permalink
fix(swingset-runner): remove --meter controls
Browse files Browse the repository at this point in the history
Now that dynamic vats require a Meter object in the `meter:` option, rather
than just a `metered:` boolean flag, the swingset-runniner `--meter` option
doesn't work anymore. I'm removing it to allow the test to keep passing.
Eventually it might be interesting to improve the CLI arguments to create and
provide a Meter, but the need for user-level code to supervise and refill it
makes that non-trivial.
  • Loading branch information
warner committed Jul 25, 2021
1 parent 7a7d616 commit cc1d3c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions packages/swingset-runner/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ FLAGS may be:
--statsfile FILE - output performance stats to FILE as a JSON object
--benchmark N - perform an N round benchmark after the initial run
--indirect - launch swingset from a vat instead of launching directly
--globalmetering - install metering on global objects
--meter - run metered vats (implies --globalmetering and --indirect)
--config FILE - read swingset config from FILE instead of inferring it
CMD is one of:
Expand Down Expand Up @@ -175,8 +173,6 @@ export async function main() {
let dumpTag = 't';
let rawMode = false;
let shouldPrintStats = false;
let globalMeteringActive = false;
let meterVats = false;
let launchIndirectly = false;
let benchmarkRounds = 0;
let configPath = null;
Expand Down Expand Up @@ -267,14 +263,6 @@ export async function main() {
case '--statsfile':
statsFile = argv.shift();
break;
case '--globalmetering':
globalMeteringActive = true;
break;
case '--meter':
meterVats = true;
globalMeteringActive = true;
launchIndirectly = true;
break;
case '--indirect':
launchIndirectly = true;
break;
Expand Down Expand Up @@ -309,10 +297,6 @@ export async function main() {
process.exit(0);
}

if (globalMeteringActive) {
log('global metering is active');
}

if (forceGC) {
if (!logMem) {
log('Warning: --forcegc without --logmem may be a mistake');
Expand Down Expand Up @@ -382,9 +366,6 @@ export async function main() {
default:
fail(`invalid database mode ${dbMode}`, true);
}
if (config.bootstrap) {
config.vats[config.bootstrap].parameters.metered = meterVats;
}
const runtimeOptions = {};
if (verbose) {
runtimeOptions.verbose = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/swingset-runner/src/vat-launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function buildRootObject(_vatPowers, vatParameters) {
// eslint-disable-next-line no-await-in-loop
const vat = await E(vatMaker).createVatByName(
bundleName,
{ metered: vatParameters.metered, vatParameters: harden(subvatParameters) },
{ vatParameters: harden(subvatParameters) },
);
vatRoots[vatName] = vat.root;
}
Expand Down

0 comments on commit cc1d3c5

Please sign in to comment.