From 75cd83d0c348d365a054f959fec1140cc7ba29d3 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Thu, 1 Aug 2024 12:32:14 -0700 Subject: [PATCH 1/2] chore: add license header and CONTRIBUTING.md --- CONTRIBUTING.md | 32 ++++++++++ internal/gcsx/append_object_creator.go | 2 +- internal/gcsx/bucket_manager_test.go | 14 +++++ .../scripts/compare_fuse_types_using_fio.py | 58 ++++++++++++------- .../ml_tests/tf/resnet/build.sh | 13 +++++ perfmetrics/scripts/fio/constants.py | 14 +++++ perfmetrics/scripts/fio/fio_metrics_test.py | 14 +++++ perfmetrics/scripts/generate_files.py | 14 +++++ perfmetrics/scripts/gsheet/gsheet.py | 17 ++++++ perfmetrics/scripts/gsheet/gsheet_test.py | 17 ++++++ .../scripts/ls_metrics/directory.proto | 14 +++++ .../scripts/ls_metrics/run_ls_benchmark.sh | 14 +++++ perfmetrics/scripts/ml_tests/setup_host.sh | 14 +++++ .../tf/resnet/setup_host_and_run_model.sh | 13 +++++ .../resnet/setup_scripts/setup_container.sh | 13 +++++ perfmetrics/scripts/populate_metrics.sh | 13 +++++ perfmetrics/scripts/populate_vm_metrics.py | 18 +++++- perfmetrics/scripts/utils/metrics_util.py | 14 +++++ .../scripts/utils/metrics_util_test.py | 14 +++++ tools/integration_tests/util/setup/setup.go | 2 +- .../util/setup/yaml-config.go | 14 +++++ tools/log_rotate/install_script.sh | 13 +++++ 22 files changed, 325 insertions(+), 26 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..8956a61b82 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# How to Contribute + +We would love to accept your patches and contributions to this project. + +## Before you begin + +### Sign our Contributor License Agreement + +Contributions to this project must be accompanied by a +[Contributor License Agreement](https://cla.developers.google.com/about) (CLA). +You (or your employer) retain the copyright to your contribution; this simply +gives us permission to use and redistribute your contributions as part of the +project. + +If you or your current employer have already signed the Google CLA (even if it +was for a different project), you probably don't need to do it again. + +Visit to see your current agreements or to +sign a new one. + +### Review our Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google/conduct/). + +## Contribution process + +### Code Reviews + +All submissions, including submissions by project members, require review. We +use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests) +for this purpose. diff --git a/internal/gcsx/append_object_creator.go b/internal/gcsx/append_object_creator.go index 8a5807c6aa..eec39e2eae 100644 --- a/internal/gcsx/append_object_creator.go +++ b/internal/gcsx/append_object_creator.go @@ -1,4 +1,4 @@ -// Copyright 2015 Google Inc. All Rights Reserved. +// Copyright 2024 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/gcsx/bucket_manager_test.go b/internal/gcsx/bucket_manager_test.go index c11f980dee..ceae78430f 100644 --- a/internal/gcsx/bucket_manager_test.go +++ b/internal/gcsx/bucket_manager_test.go @@ -1,3 +1,17 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed 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. + package gcsx import ( diff --git a/perfmetrics/scripts/compare_fuse_types_using_fio.py b/perfmetrics/scripts/compare_fuse_types_using_fio.py index 49ba20ce69..969e4f0d22 100644 --- a/perfmetrics/scripts/compare_fuse_types_using_fio.py +++ b/perfmetrics/scripts/compare_fuse_types_using_fio.py @@ -1,13 +1,27 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """Python script to do FIO test for GCSFuse Vs GCSFuse/Goofys. To run the script: -python3 compare_fuse_types_using_fio.py -- --fuse_type_1= --fuse_type_1_version= --flags_1= +python3 compare_fuse_types_using_fio.py -- --fuse_type_1= --fuse_type_1_version= --flags_1= --fuse_type_2= --fuse_type_2_version= --flags_2= --jobfile_path= --gcs_bucket= 1) --fuse_type_1= & --fuse_type_2= -> Value1 and value2 can be fuse based filesystem name. --> fuse based filesystem name is used for logging so it can be anything. --> For GCSFuse it should be 'gcsfuse' +-> fuse based filesystem name is used for logging so it can be anything. +-> For GCSFuse it should be 'gcsfuse' 2) --fuse_type_1_version= & --fuse_type_2_version= -> For GCSFuse you can mention any released version or ‘master’ as version if you want to build from source. -> For other fuse based filesystem provide the link of github repository. @@ -20,8 +34,8 @@ 5) --gcs_bucket= -> Name of the GCS bucket to be mounted for FIO load test. -The code takes input the fuse based filesystem type and its version, required flags to mount the bucket, jobfile_path, -and gcs bucket name as input for fio test. Then it will perform the fio test for each of the given +The code takes input the fuse based filesystem type and its version, required flags to mount the bucket, jobfile_path, +and gcs bucket name as input for fio test. Then it will perform the fio test for each of the given fuse based filesystem type at a specific version and extract fio_metrics to 'output.txt' file in the 'out' directory. """ @@ -38,9 +52,9 @@ def _install_gcsfuse(version, gcs_bucket, gcsfuse_flags) -> None: """Install gcsfuse with Specific version. - + Args: - version(str): Gcsfuse version to be installed. + version(str): Gcsfuse version to be installed. gcs_bucket(str): GCS bucket to be mounted. gcsfuse_flags(str): Fuse flags for mounting the GCS bucket. """ @@ -53,9 +67,9 @@ def _install_gcsfuse(version, gcs_bucket, gcsfuse_flags) -> None: def _install_gcsfuse_source(gcs_bucket, gcsfuse_flags) -> None: """Run gcsfuse from source code. - + Args: - version(str): Gcsfuse version to be installed. + version(str): Gcsfuse version to be installed. gcs_bucket(str): GCS bucket to be mounted. """ os.system(f'''git clone {GCSFUSE_REPO} @@ -65,10 +79,10 @@ def _install_gcsfuse_source(gcs_bucket, gcsfuse_flags) -> None: cd .. ''') - + def _remove_gcsfuse(version) -> None: """Remove gcsfuse with specific version. - + Args: version(str): Gcsfuse version to be removed. """ @@ -82,7 +96,7 @@ def _remove_gcsfuse(version) -> None: def _install_fuse(fuse_type, fuse_url, fuse_flags, gcs_bucket) -> None: """Install latest version of given fuse based filesystem. - + Args: fuse_type(str): Fuse type for fio test. fuse_url(str): URL of github repo of given fuse based filesystem. @@ -100,7 +114,7 @@ def _install_fuse(fuse_type, fuse_url, fuse_flags, gcs_bucket) -> None: def _remove_fuse(fuse_type) -> None: """Remove the given fuse based filesystem. - + Args: fuse_type(str): Fuse type for fio test. """ @@ -112,7 +126,7 @@ def _remove_fuse(fuse_type) -> None: def _run_fio_test(jobfile_path, fio_metrics_obj) -> None: """Run fio test and extract metrics to output.txt file. - + Args: jobfile(str): Path of the job file. fio_metrics_obj(str): Object for extracting fio metrics. @@ -127,7 +141,7 @@ def _run_fio_test(jobfile_path, fio_metrics_obj) -> None: def _gcsfuse_fio_test(version, jobfile_path, fio_metrics_obj, gcs_bucket, fuse_flags) -> None: """FIO test for gcsfuse of given version. - + Args: version(str): Gcsfuse version to perform fio test. jobfile(str): Path of the job file. @@ -139,14 +153,14 @@ def _gcsfuse_fio_test(version, jobfile_path, fio_metrics_obj, gcs_bucket, fuse_f _install_gcsfuse_source(gcs_bucket, fuse_flags) else: _install_gcsfuse(version, gcs_bucket, fuse_flags) - + _run_fio_test(jobfile_path, fio_metrics_obj) _remove_gcsfuse(version) def _fuse_fio_test(fuse_type, jobfile_path, fio_metrics_obj, gcs_bucket, fuse_flags, fuse_url) -> None: """FIO test for latest version of goofys. - + Args: fuse_type(str): Fuse type for fio test. jobfile(str): Path of the job file. @@ -159,10 +173,10 @@ def _fuse_fio_test(fuse_type, jobfile_path, fio_metrics_obj, gcs_bucket, fuse_fl _run_fio_test(jobfile_path, fio_metrics_obj) _remove_fuse(fuse_type) - + def _fuse_test(fuse_type, fuse_type_version, jobfile_path, fio_metric_obj, gcs_bucket, fuse_flags) -> None: """FIO test for specific version of given fuse type. - + Args: fuse_type(str): Fuse type for fio test. fuse_type_version(str): Fuse type version for fio test. @@ -175,8 +189,8 @@ def _fuse_test(fuse_type, fuse_type_version, jobfile_path, fio_metric_obj, gcs_b _gcsfuse_fio_test(fuse_type_version, jobfile_path, fio_metric_obj, gcs_bucket, fuse_flags) else: _fuse_fio_test(fuse_type, jobfile_path, fio_metric_obj, gcs_bucket, fuse_flags, fuse_type_version) - - + + def main(argv) -> None: parser = argparse.ArgumentParser() @@ -226,4 +240,4 @@ def main(argv) -> None: if __name__ == '__main__': app.run(main) - + diff --git a/perfmetrics/scripts/continuous_test/ml_tests/tf/resnet/build.sh b/perfmetrics/scripts/continuous_test/ml_tests/tf/resnet/build.sh index 4a361607ef..4b51dbc27d 100755 --- a/perfmetrics/scripts/continuous_test/ml_tests/tf/resnet/build.sh +++ b/perfmetrics/scripts/continuous_test/ml_tests/tf/resnet/build.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. # This will stop execution when any command will have non-zero status. set -e diff --git a/perfmetrics/scripts/fio/constants.py b/perfmetrics/scripts/fio/constants.py index 0314f22d24..a5b3ad4122 100644 --- a/perfmetrics/scripts/fio/constants.py +++ b/perfmetrics/scripts/fio/constants.py @@ -1,3 +1,17 @@ +# Copyright 2023 Google Inc. All Rights Reserved. +# +# Licensed 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. + """Contains constants for fio_metrics. """ diff --git a/perfmetrics/scripts/fio/fio_metrics_test.py b/perfmetrics/scripts/fio/fio_metrics_test.py index 8f19ecb8e9..82016b7efe 100644 --- a/perfmetrics/scripts/fio/fio_metrics_test.py +++ b/perfmetrics/scripts/fio/fio_metrics_test.py @@ -1,3 +1,17 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """Tests for fio_metrics. Usage from perfmetrics/scripts folder: python3 -m fio.fio_metrics_test diff --git a/perfmetrics/scripts/generate_files.py b/perfmetrics/scripts/generate_files.py index 2795fea5c2..191b5308ac 100644 --- a/perfmetrics/scripts/generate_files.py +++ b/perfmetrics/scripts/generate_files.py @@ -1,3 +1,17 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """This script takes input the number of files and the file size and creates required files and simultaneously uploads them on the gcs bucket. The progress is updated in 'output.out' file. diff --git a/perfmetrics/scripts/gsheet/gsheet.py b/perfmetrics/scripts/gsheet/gsheet.py index 0fc8ccb6ff..0e4266e2ae 100644 --- a/perfmetrics/scripts/gsheet/gsheet.py +++ b/perfmetrics/scripts/gsheet/gsheet.py @@ -1,3 +1,20 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. +# To run the script, run in terminal : +# python3 generate_folders_and_files.py + from google.oauth2 import service_account from googleapiclient.discovery import build diff --git a/perfmetrics/scripts/gsheet/gsheet_test.py b/perfmetrics/scripts/gsheet/gsheet_test.py index 99e9229867..f93291b4dd 100644 --- a/perfmetrics/scripts/gsheet/gsheet_test.py +++ b/perfmetrics/scripts/gsheet/gsheet_test.py @@ -1,3 +1,20 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. +# To run the script, run in terminal : +# python3 generate_folders_and_files.py + """Tests for gsheet.""" import unittest from unittest import mock diff --git a/perfmetrics/scripts/ls_metrics/directory.proto b/perfmetrics/scripts/ls_metrics/directory.proto index 41933ea362..c5496aa1d5 100644 --- a/perfmetrics/scripts/ls_metrics/directory.proto +++ b/perfmetrics/scripts/ls_metrics/directory.proto @@ -1,3 +1,17 @@ +// Copyright 2024 Google Inc. All Rights Reserved. +// +// Licensed 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. + syntax = "proto3"; package perfmetrics; diff --git a/perfmetrics/scripts/ls_metrics/run_ls_benchmark.sh b/perfmetrics/scripts/ls_metrics/run_ls_benchmark.sh index dc3a60a3c2..d24ae5559c 100755 --- a/perfmetrics/scripts/ls_metrics/run_ls_benchmark.sh +++ b/perfmetrics/scripts/ls_metrics/run_ls_benchmark.sh @@ -1,4 +1,18 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + set -e # Refer for env var: https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python diff --git a/perfmetrics/scripts/ml_tests/setup_host.sh b/perfmetrics/scripts/ml_tests/setup_host.sh index e89c77e5c2..cd2f73ee5e 100755 --- a/perfmetrics/scripts/ml_tests/setup_host.sh +++ b/perfmetrics/scripts/ml_tests/setup_host.sh @@ -1,4 +1,18 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + # This file installs docker engine and nvidia driver and nvidia container tool # necessary for running dlc container on the vm diff --git a/perfmetrics/scripts/ml_tests/tf/resnet/setup_host_and_run_model.sh b/perfmetrics/scripts/ml_tests/tf/resnet/setup_host_and_run_model.sh index d24516c2b9..9cd3466a04 100755 --- a/perfmetrics/scripts/ml_tests/tf/resnet/setup_host_and_run_model.sh +++ b/perfmetrics/scripts/ml_tests/tf/resnet/setup_host_and_run_model.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. # This will stop execution when any command will have non-zero status. set -e diff --git a/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh b/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh index 229e2d0525..202d0d80e2 100755 --- a/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh +++ b/perfmetrics/scripts/ml_tests/tf/resnet/setup_scripts/setup_container.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. # Installs go1.22.4 on the container, builds gcsfuse using log_rotation file # and installs tf-models-official v2.13.2, makes update to include clear_kernel_cache diff --git a/perfmetrics/scripts/populate_metrics.sh b/perfmetrics/scripts/populate_metrics.sh index 8e46304b64..aab4291563 100755 --- a/perfmetrics/scripts/populate_metrics.sh +++ b/perfmetrics/scripts/populate_metrics.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. #To run the script #>> ./populate_metrics.sh diff --git a/perfmetrics/scripts/populate_vm_metrics.py b/perfmetrics/scripts/populate_vm_metrics.py index 0dff1d7979..12a7b257bf 100644 --- a/perfmetrics/scripts/populate_vm_metrics.py +++ b/perfmetrics/scripts/populate_vm_metrics.py @@ -1,3 +1,17 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """Executes vm_metrics.py by passing appropriate arguments. To run the script: @@ -12,7 +26,7 @@ INSTANCE = socket.gethostname() metric_data_name = ['start_time_sec', 'cpu_utilization_peak','cpu_utilization_mean', - 'network_bandwidth_peak', 'network_bandwidth_mean', 'gcs/ops_latency', + 'network_bandwidth_peak', 'network_bandwidth_mean', 'gcs/ops_latency', 'gcs/read_bytes_count', 'gcs/ops_error_count'] if __name__ == '__main__': @@ -28,7 +42,7 @@ time.sleep(250) vm_metrics_obj = vm_metrics.VmMetrics() - + start_time_sec = int(argv[1]) end_time_sec = int(argv[2]) period = end_time_sec - start_time_sec diff --git a/perfmetrics/scripts/utils/metrics_util.py b/perfmetrics/scripts/utils/metrics_util.py index 9d784fdbb4..79b4845f94 100644 --- a/perfmetrics/scripts/utils/metrics_util.py +++ b/perfmetrics/scripts/utils/metrics_util.py @@ -1,3 +1,17 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """ Script for removing logs older than last num_files_retain in descending order Usage: diff --git a/perfmetrics/scripts/utils/metrics_util_test.py b/perfmetrics/scripts/utils/metrics_util_test.py index 9511d3f669..174d5046bb 100644 --- a/perfmetrics/scripts/utils/metrics_util_test.py +++ b/perfmetrics/scripts/utils/metrics_util_test.py @@ -1,3 +1,17 @@ +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. + """Test for fio output logging.""" import unittest diff --git a/tools/integration_tests/util/setup/setup.go b/tools/integration_tests/util/setup/setup.go index c3f42922f1..c5124fe78c 100644 --- a/tools/integration_tests/util/setup/setup.go +++ b/tools/integration_tests/util/setup/setup.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google Inc. All Rights Reserved. +// Copyright 2024 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/integration_tests/util/setup/yaml-config.go b/tools/integration_tests/util/setup/yaml-config.go index 2474b12c8c..7b3e7b54a9 100644 --- a/tools/integration_tests/util/setup/yaml-config.go +++ b/tools/integration_tests/util/setup/yaml-config.go @@ -1,3 +1,17 @@ +// Copyright 2024 Google Inc. All Rights Reserved. +// +// Licensed 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. + package setup import ( diff --git a/tools/log_rotate/install_script.sh b/tools/log_rotate/install_script.sh index 94f8de4439..2782097e19 100755 --- a/tools/log_rotate/install_script.sh +++ b/tools/log_rotate/install_script.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2024 Google Inc. All Rights Reserved. +# +# Licensed 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. # Create directory, which keeps all logrotate-config to rotate hourly. mkdir -p /etc/logrotate.hourly.d From 306f824750a26ed2715aff84667a348ab600365c Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Mon, 5 Aug 2024 08:53:43 -0700 Subject: [PATCH 2/2] address feedback --- perfmetrics/scripts/gsheet/gsheet.py | 3 --- perfmetrics/scripts/gsheet/gsheet_test.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/perfmetrics/scripts/gsheet/gsheet.py b/perfmetrics/scripts/gsheet/gsheet.py index 0e4266e2ae..826a5f4759 100644 --- a/perfmetrics/scripts/gsheet/gsheet.py +++ b/perfmetrics/scripts/gsheet/gsheet.py @@ -10,10 +10,7 @@ # 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. -# To run the script, run in terminal : -# python3 generate_folders_and_files.py from google.oauth2 import service_account from googleapiclient.discovery import build diff --git a/perfmetrics/scripts/gsheet/gsheet_test.py b/perfmetrics/scripts/gsheet/gsheet_test.py index f93291b4dd..7501dc7c33 100644 --- a/perfmetrics/scripts/gsheet/gsheet_test.py +++ b/perfmetrics/scripts/gsheet/gsheet_test.py @@ -10,10 +10,7 @@ # 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. -# To run the script, run in terminal : -# python3 generate_folders_and_files.py """Tests for gsheet.""" import unittest