Skip to content

Commit

Permalink
[PERF-337] skip partitions endpoint in paging metrics (#114)
Browse files Browse the repository at this point in the history
* skip partitions endpoint in paging metrics

* formatting change

* action version updates

* indentation fix

* action version updates
  • Loading branch information
vimayya authored Jan 8, 2025
1 parent 47ce131 commit 9bad2be
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Install Poetry
run: pipx install poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Dependency Review ("Dependabot on PR")
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/edfi_paging_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Install Poetry
run: pipx install poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/edfi_performance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Install Poetry
run: pipx install poetry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terraform-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3

- name: Create terraform.tfvars
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terraform-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
working-directory: ./eng/terraform
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3

- name: Azure Login
run: |
Expand Down
14 changes: 12 additions & 2 deletions src/edfi-paging-test/edfi_paging_test/helpers/api_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,18 @@ def get_resource_paths(api_base_url: str, verify_cert: bool = True) -> List[str]
str, Dict[str, str]
] = get_resource_metadata_response(api_base_url, verify_cert)
all_paths: List[str] = list(resource_metadata_response["paths"].keys())
# filter out paths that are for get by id, deletes or keyChanges
return list(filter(lambda p: "{id}" not in p and "/deletes" not in p and "/keyChanges" not in p, all_paths))
# filter out paths that are for get by id, deletes, keyChanges or partitions
return list(
filter(
lambda p: (
"{id}" not in p
and "/deletes" not in p
and "/keyChanges" not in p
and "/partitions" not in p
)
, all_paths
)
)


def normalize_resource_paths(resource_paths: List[str]) -> List[str]:
Expand Down

0 comments on commit 9bad2be

Please sign in to comment.