File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ function Invoke-ListApiTest {
2222 $Response.AllowedTenants = $script :CippAllowedTenantsStorage.Value
2323 $Response.AllowedGroups = $script :CippAllowedGroupsStorage.Value
2424
25+ # test Get-AzAccessToken vs Get-CIPPAzAccessToken timing with stopwatch
26+ $Sw = [System.Diagnostics.Stopwatch ]::StartNew()
27+ $null = Get-AzAccessToken
28+ $Sw.Stop ()
29+ $Timings = @ {}
30+ $Timings.GetAzAccessTokenMs = $Sw.Elapsed.TotalMilliseconds
31+ $Sw = [System.Diagnostics.Stopwatch ]::StartNew()
32+ $null = Get-CIPPAzIdentityToken
33+ $Sw.Stop ()
34+ $Timings.GetCippAzIdentityTokenMs = $Sw.Elapsed.TotalMilliseconds
35+ $Response.Timings = $Timings
36+
2537 return ([HttpResponseContext ]@ {
2638 StatusCode = [HttpStatusCode ]::OK
2739 Body = $Response
You can’t perform that action at this time.
0 commit comments