-
Notifications
You must be signed in to change notification settings - Fork 849
Fix lua_states_stats Au test. #7232
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| (global) id: 0 | ||
| (global) id: 1 | ||
| (global) id: 2 | ||
| (global) id: 3 | ||
| (remap) id: 0 | ||
| (remap) id: 1 | ||
| (remap) id: 2 | ||
| (remap) id: 3 |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| plugin.lua.global.states | ||
| plugin.lua.global.gc_bytes | ||
| plugin.lua.global.threads | ||
| plugin.lua.remap.states | ||
| plugin.lua.remap.gc_bytes | ||
| plugin.lua.remap.threads |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| traffic_ctl plugin msg ts_lua print_stats | ||
| N=60 | ||
| while (( N > 0 )) | ||
| do | ||
| sleep 1 | ||
| rm -f lifecycle.out | ||
| grep -F ' ts_lua ' ts.stderr.txt | \ | ||
| sed -e 's/^.* ts_lua //' -e 's/ gc_kb:.*gc_kb_max:.*threads:.*threads_max:.*$//' > lifecycle.out | ||
| if diff lifecycle.out ${AUTEST_TEST_DIR}/gold/lifecycle.gold > /dev/null | ||
| then | ||
| exit 0 | ||
| fi | ||
| let N=N-1 | ||
| done | ||
| echo TIMEOUT | ||
| exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| N=60 | ||
| while (( N > 0 )) | ||
| do | ||
| rm -f metrics.out metrics.txt | ||
| traffic_ctl metric match lua > metrics.out | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it make more sense to just get all the metrics by explicitly mention their names? can occur that we get more metrics than the ones you defined in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I don't know enough about metrics generally to know if there is a risk that other metrics would appear in the output in a pseudo-random fashion. I did not see that in my testing. |
||
| sleep 1 | ||
| sed 's/ [0-9][0-9]*//' metrics.out > metrics.txt | ||
| if diff metrics.txt ${AUTEST_TEST_DIR}/gold/metrics.gold | ||
| then | ||
| exit 0 | ||
| fi | ||
| let N=N-1 | ||
| done | ||
| echo TIMEOUT | ||
| exit 1 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have this text being grabbed in the Streams object. We should have examples test using later for a given test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lifecycle_stats.sh script needs to read the stderr output from traffic_manager. I tried reading it from the stderr file in _output for the ts process, but the output the script needs gets buffered in memory. In any case, not good to hardcode the sandbox tree structure into tests.