Skip to content

Performance Testing

Abhidnya edited this page Mar 24, 2021 · 7 revisions

This summarizes the very first performance testing done with MSAL Go. Below is a description of test environments and findings.

Test set up

Method used for testing is AcquireTokenForClient(). An external storage was used which was partitioned based on the suggested Cache key given out by MSAL Go. The external storage used is this https://github.com/patrickmn/go-cache This scenario is relevant for multi tenant applications The cache key is of the format "clientid_tenant_id_AppTokenCache"

The application is a multi tenant application. The input scenario is there are n number of tenants and t is the total number of tokens. So, as an example, 8 tenants will create 8 partitions and t number of tokens are distributed evenly in these partitions. It was tested on a SurfaceBook2(Intel(R)Core(TM) i7-8650U CPU @ 1.90GHz, 16GB RAM, 4 cores) and a Windows 10 Enterprise

Results

8 tenants[400 tokens]

[population: total 339.6461ms, avg 849.115µs]

[retrieval: total 541.51ms, avg 1.353775ms]

Metric Duration
P50 8.0011ms
P90 18.9979ms
P95 23.4347ms
P99 33.001ms

8 tenants[4000 tokens]

[population: total 20.0575471s, avg 5.014386ms]

[retrieval: total 37.9617192s, avg 9.490429ms]

Metric Duration
P50 71.911ms
P90 91.9986ms
P95 101.5738ms
P99 125.1604ms

20 tenants[10000 tokens]

[population: total 56.536525s, avg 5.653652ms]

[retrieval: total 1m35.096975s, avg 9.509697ms]

Metric Duration
P50 164.0282ms
P90 317.3987ms
P95 380.0175ms
P99 528.0025ms

50 tenants[20000 tokens]

[population: total 1m22.1239372s, avg 4.106196ms]

[retrieval: total 2m16.1046618s, avg 6.805233ms]

Metric Duration
P50 247.8382ms
P90 710.1703ms
P95 891.5099ms
P99 1.2862018s

100 tenants[20000 tokens]

[population: total 37.7030427s, avg 1.885152ms]

[retrieval: total 1m10.3857916s, avg 3.519289ms]

Metric Duration
P50 120.0008ms
P90 961.9423ms
P95 1.3079966s
P99 2.0417578s

Future work

We continue to invest in the performance testing. Future work includes increasing the number of metrics (ex. cache size growth) and test cases, running the performance tests on a regular schedule, creating more reports (ex. via App Insights).

Getting Started with MSAL Go

  1. Home
  2. Build and Test
Clone this wiki locally