-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
[FEATURE]: extract line number in metrics declaration #1725
Comments
Is there a particular reason you repeat this line?: buildtest/buildtest/builders/base.py Line 947 in 44e9da7
|
@shahzebsiddiqui |
@Xiangs18 that line should be removed now that I see it is redundant. The metrics are initialized as quotes as their initial value. I think that was the case because we didn't want None as the value due to the way they are written into the report file. |
@Xiangs18 https://github.com/buildtesters/buildtest/blob/devel/aws_tutorial/osu_bandwidth_test.yml is the test we have but it works in aws image so u won't be able to run it locally the osu microbenchmark can be installed locally but also requires MPI. This is typically provided by mvapich package. For this PR u can basically simulate this by simply echo this output into file and try to assign a metric value. |
You might find it helpful seeing this example using By default we use re.search which is gonna let u search anywhere in string. The re.match will only search pattern at beginning of string whereas re.fullmatch must match entire string. See the example and it will make more sense |
Please describe your feature
Buildtest should have ability to extract line from stdout/stderr that can be assigned to a metric which can be used later for status check. For instance let's take the following results from OSU bandwidth test result and we want to extract a particular line
At the moment we have support for regex in metrics that can be used as comparison which works fine.
This regex is applied on entire content of file and not on a particular line.
For this feature, we would like to add a key something like
linenum
that will be used to extract a particular line where regex is applied. To extend this example we can simply do the followingThe
linenum
must be an integer and it can be any value including negative values. The idea is that we simply extract the line from file and apply regex on the specific line.linenum: -1
would mean last line of file andlinenum: 0
would be first line of file.Suggest potential solution
No response
Additional Information
No response
Post question in Slack
Is there an existing issue
The text was updated successfully, but these errors were encountered: