Skip to content
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

fix(xsnap): upgrade to latest xsnap, now with timestamps, and update METER_TYPE #5598

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

warner
Copy link
Member

@warner warner commented Jun 15, 2022

fix(xsnap): upgrade to latest xsnap, now with timestamps

This moves to the version of xsnap-worker.c which includes
receipt/transmit timestamps in the metering results.

Tests are updated to expect 'timestamps' in xsnap metering results,
and to assert that they correctly interleave with the times of
upstream/downstream commands as seen by the parent process.

refs #5152

@warner warner added the xsnap the XS execution tool label Jun 15, 2022
@warner warner requested a review from dckc June 15, 2022 07:33
@warner warner self-assigned this Jun 15, 2022
@warner warner force-pushed the 5152-add-xsnap-timestamps branch 3 times, most recently from 28cac3a to 94b7a28 Compare June 15, 2022 15:28
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. one suggestion to consider...


t.deepEqual(sortedNames, expected);

// on my 2022 MBP (M1 Pro), syscalls take 75-600us to get from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to t.log() such numbers so I can eyeball them with ava test -v.

@warner warner force-pushed the 5152-add-xsnap-timestamps branch from 94b7a28 to aa4be60 Compare June 15, 2022 15:52
@warner warner added the automerge:rebase Automatically rebase updates, then merge label Jun 15, 2022
PR #5338 updated our copy of the XS SDK to the most recent
version. That might have changed the metering behavior, so we need to
update METER_TYPE from `xs-meter-13` to `xs-meter-14`, so downstream
users know that computron counts aren't necessarily compatible across
this change.
This moves to the version of `xsnap-worker.c` which includes
receipt/transmit timestamps in the metering results.

Tests are updated to expect 'timestamps' in xsnap metering results,
and to assert that they correctly interleave with the times of
upstream/downstream commands as seen by the parent process.

refs #5152
@warner warner force-pushed the 5152-add-xsnap-timestamps branch from aa4be60 to c857cc8 Compare June 15, 2022 16:27
@mergify mergify bot merged commit 1505285 into master Jun 15, 2022
@mergify mergify bot deleted the 5152-add-xsnap-timestamps branch June 15, 2022 17:05
@@ -3,7 +3,7 @@
/** The version identifier for our meter type.
* TODO Bump this whenever there's a change to metering semantics.
*/
export const METER_TYPE = 'xs-meter-13';
export const METER_TYPE = 'xs-meter-14';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "a change to metering semantics" mean exactly? What is the purpose of this bump? Should this be automated, or at least tested so that an effective change to XS is represented here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, there is a test:

t.like(
meters,
{ compute: 1_380_187, allocate: 42_074_144 },
'compute, allocate meters should be stable; update METER_TYPE?',
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I don't see what in this PR causes the need to update the meter type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the addition of timestamps was, conservatively, considered to be a change in the metering semantics. Note the test for the shape of the meters object just after the test for magnitudes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge xsnap the XS execution tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants