Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Reduce number of ARM calls in ListVmss #2539

Merged
merged 10 commits into from
Oct 27, 2022
Merged

Reduce number of ARM calls in ListVmss #2539

merged 10 commits into from
Oct 27, 2022

Conversation

Porges
Copy link
Member

@Porges Porges commented Oct 20, 2022

  1. ListVmss was invoking GetVirtualMachineScaleSetAsync and then GetVirtualMachineScaleSetVms; instead we can get the VMSS resource directly and invoke GetVirtualMachineScaleSetVms on it.

  2. I also removed some unneeded invocations of AsAsyncEnumerable which might be turning async enumerables into sync enumerables.

  3. Do the same HasData check in the instance ID lookup that we were already doing in ListVmss.

After this change (#3) we no longer do any GETs against individual VMSS VMs during the check-pr run:
image

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2022

Codecov Report

Merging #2539 (eb9e85f) into main (9299357) will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2539      +/-   ##
==========================================
+ Coverage   29.82%   29.83%   +0.01%     
==========================================
  Files         289      289              
  Lines       35750    35738      -12     
==========================================
  Hits        10664    10664              
+ Misses      25086    25074      -12     
Impacted Files Coverage Δ
...ervice/ApiService/onefuzzlib/ScalesetOperations.cs 2.66% <0.00%> (+<0.01%) ⬆️
...ApiService/ApiService/onefuzzlib/VmssOperations.cs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Porges Porges force-pushed the reduce-arm-calls branch 2 times, most recently from ca5baa4 to f2c7960 Compare October 26, 2022 21:04
@Porges Porges force-pushed the reduce-arm-calls branch 3 times, most recently from 8a7b7cd to 8092f9e Compare October 27, 2022 20:10
@Porges Porges enabled auto-merge (squash) October 27, 2022 22:32
@Porges Porges merged commit fc2f29d into main Oct 27, 2022
@Porges Porges deleted the reduce-arm-calls branch October 27, 2022 22:47
@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants