Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

extend process.sh to support patch stages #22

Merged
merged 6 commits into from
Nov 23, 2016

Conversation

nikomatsakis
Copy link
Contributor

The idea is that we want to support incremental tests where we do some
base build step and then apply a series of patches. We want to track the
compilation time after each of these patches separately. The model is
that from one directory $DIR we will create N files, one for each
patch. They will be named $DIR@$PATCH -- they are basically independent
tests from the POV of the front-end.

This is achieved by extending the makefile protocol mildly. There is now
a new target make patches that emits a list of patch names. These
should include the separator (e.g., @foo, @bar).

If the list of patches returned is empty, the code works as before.
We execute '(make all; make touch)+ make clean'. The results from
'make all' are stored in $dir--$DATE--$i.

If the last of patches is non-empty (say '@A @b'), then we execute
'(make all@A; make all@B; make touch)+ make clean'. The results from
'make all' are stored in $dir@A--$DATE--$i and $dir@B--$DATE--$i.

The naming convention for variants is as follows:

@NNN-text

where NN is 000, 010, 020, 030, etc, and text is some useful description.
The @ is a distinctive separator we can special-case in the front-end
later.

the lower-case one is the right one, and the upper-case one messes with
mac clients something terrible
The idea is that we want to support incremental tests where we do some
base build step and then apply a series of patches. We want to track the
compilation time after each of these patches separately. The model is
that from one directory $DIR we will create N files, one for each
patch. They will be named $DIR@$PATCH -- they are basically independent
tests from the POV of the front-end.

This is achieved by extending the makefile protocol mildly. There is now
a new target `make patches` that emits a list of patch names. These
should include the separator (e.g., `@foo`, `@bar`).

If the list of patches returned is empty, the code works as before.
We execute '(make all; make touch)+ make clean'. The results from
'make all' are stored in `$dir--$DATE--$i`.

If the last of patches is *non-empty* (say '@A @b'), then we execute
'(make all@A; make all@B; make touch)+ make clean'. The results from
'make all' are stored in `$dir@A--$DATE--$i` and `$dir@B--$DATE--$i`.

The naming convention for variants is as follows:

    @NNN-text

where NN is 000, 010, 020, 030, etc, and text is some useful description.
The @ is a distinctive separator we can special-case in the front-end
later.
we first build normally, then incrementally (with no saved state), and
finally incrementally again (without changing anything)
cd $RUST_DIR
git show HEAD -s >$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
cd $START/$dir
echo "rustc: ./$dir" >>$TIMES_DIR/raw/$dir$PATCH--$DATE--$i.log
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I need to actually to change this to rustc: ./$dir$PATH, but that will presumably require updating process.py as well

@nikomatsakis
Copy link
Contributor Author

Note: this needs rust-lang-nursery/rustc-timing-scripts#1 I think.

@nikomatsakis
Copy link
Contributor Author

Also, I added a new test (regex-0.1.80) which shows off the infrastructure by applying a number of patches. (cc @michaelwoerister)

@nikomatsakis
Copy link
Contributor Author

Ah I remember now that in the makefile where I am touching a bunch of files, this was to workaround a mac bug where cargo will fail to rebuild even if files have changed -- because the mac "detect files that changed" facility is too slow to notice the changes. I added the calls to touch which add enough of a delay on mac, but better would be sleep 1 or something like that, I guess.

@nrc nrc merged commit 347153f into rust-lang-deprecated:master Nov 23, 2016
@nnethercote
Copy link
Contributor

This change broke the process.py script. make is now a no-op when done after make touch for syntex, which means we get silly, tiny times like this:

syntex-0.42.2    0.070s vs  0.069s --> 1.013x faster (variance: 1.019x, 1.006x)

@nikomatsakis
Copy link
Contributor Author

@nnethercote do you mean compare.py?

@nnethercote
Copy link
Contributor

Sorry, yes, compare.py.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants