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

Make invocation number accessible #230

Merged
merged 16 commits into from
Aug 1, 2023

Conversation

naomiGrew
Copy link
Contributor

No description provided.

@naomiGrew naomiGrew force-pushed the make-invocation-number-accessible branch from 64940a1 to 1e6b0f0 Compare July 27, 2023 13:59
@naomiGrew
Copy link
Contributor Author

naomiGrew commented Jul 27, 2023

implements #216

docs/config.md Outdated Show resolved Hide resolved
rebench/executor.py Outdated Show resolved Hide resolved
rebench/executor.py Outdated Show resolved Hide resolved
rebench/model/run_id.py Outdated Show resolved Hide resolved
rebench/model/run_id.py Outdated Show resolved Hide resolved
rebench/tests/features/issue_216.data Outdated Show resolved Hide resolved
@naomiGrew
Copy link
Contributor Author

config.md needs an example of how to use %(invocations) around line 220, i have added a description but i couldn't think of a good example

@naomiGrew
Copy link
Contributor Author

The test currently only results on one data point being produced?
/Users/naomigrew/Documents/ReBench/rebench/tests/features/issue_216_test.py:45: in _records_data_points
self.assertEqual(num_data_points, run.get_number_of_data_points())
E AssertionError: 10 != 1

@naomiGrew
Copy link
Contributor Author

for loop in issue_216_vm.py is needed otherwise it causes the following error
self = <rebench.model.data_point.DataPoint object at 0x103588a90>

def get_total_unit(self):
  return self._total.unit

E AttributeError: 'NoneType' object has no attribute 'unit'

/Users/naomigrew/Documents/ReBench/rebench/model/data_point.py:55: AttributeError

naomiGrew and others added 11 commits August 1, 2023 13:05
Create issue_216.conf

Create issue_216_test.py

Create issue_216.data

give a value to invocation if in cmdline

add functions to store and get the updated cmdline

add invocation as a command
Co-authored-by: Stefan Marr <[email protected]>
Co-authored-by: Stefan Marr <[email protected]>
Co-authored-by: Stefan Marr <[email protected]>
@smarr smarr force-pushed the make-invocation-number-accessible branch from 1b2512f to b73bcf0 Compare August 1, 2023 12:05
@smarr smarr force-pushed the make-invocation-number-accessible branch from 43c5468 to f1af604 Compare August 1, 2023 13:25
@smarr smarr force-pushed the make-invocation-number-accessible branch from f1af604 to 5b147cd Compare August 1, 2023 13:32
smarr added 2 commits August 1, 2023 14:39
…ny adapter applied

The adapters may introduce arbitrary data, for instance the TimeAdapter may introduces a string that encodes how to output MaxRSS using %M.
Since all this can be confused with our variables, we need to use a new `. cmdline_for_next_invocation()` method when aquiring the command.
@smarr smarr force-pushed the make-invocation-number-accessible branch from 7574deb to 02b8fe9 Compare August 1, 2023 13:40
@smarr
Copy link
Owner

smarr commented Aug 1, 2023

Thanks for preparing this.

I added an example to the documentation, simplified your test quite a bit so that it really just prints out the current invocation number, and configure it to invoke the run 4 times, which checks what we want to check, and makes the test pass.

Though, I noticed that we can't really just expand the variable in the executor, because this is after we appended all kind of other, possibly arbitrary data to the command line.
For instance, the TimeAdapter allows us to measure the maximum amount of memory being used, which inserts a completely unrelated format string with a % into the command line. So, I actually moved this to the RunId and make all these adapters call the new run_id.cmdline_for_next_invocation() method, before the adapters add their stuff. This way, we can be sure there's nothing else incompatible in the command line.

@smarr smarr merged commit 0e6d009 into smarr:master Aug 1, 2023
@smarr smarr linked an issue Aug 1, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make invocation number accessible in command line.
2 participants