Skip to content

Commit

Permalink
Update measure memory test
Browse files Browse the repository at this point in the history
Set high threshold for memory usage, we want the test succeed and
only fail if the memory usage increases dramatically.
  • Loading branch information
Danielius1922 committed Aug 20, 2024
1 parent 892d77f commit 47288c5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/measureMemory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,49 +70,49 @@ jobs:
numDevices: 1
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/1/size/1KB
numDevices: 1
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/125/size/16KB
numDevices: 1
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/125/size/1KB
numDevices: 1
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/250/size/16KB
numDevices: 1
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/250/size/1KB
numDevices: 1
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/500/size/16KB
numDevices: 1
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 50
expectedRssInMb: 100
timeout: 120m
- name: devices/1/resources/500/size/1KB
numDevices: 1
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 50
expectedRssInMb: 100
logLevel: info
logDumpBody: true
timeout: 120m
Expand All @@ -121,196 +121,196 @@ jobs:
numDevices: 1000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/1/size/1KB
numDevices: 1000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/125/size/16KB
numDevices: 1000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/125/size/1KB
numDevices: 1000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/250/size/16KB
numDevices: 1000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/250/size/1KB
numDevices: 1000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/500/size/16KB
numDevices: 1000
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
- name: devices/1000/resources/500/size/1KB
numDevices: 1000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 145
expectedRssInMb: 250
timeout: 120m
#2500
- name: devices/2500/resources/1/size/16KB
numDevices: 2500
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/1/size/1KB
numDevices: 2500
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/125/size/16KB
numDevices: 2500
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/125/size/1KB
numDevices: 2500
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/16KB
numDevices: 2500
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/1KB
numDevices: 2500
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/250/size/16KB
numDevices: 2500
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
- name: devices/2500/resources/500/size/1KB
numDevices: 2500
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 210
expectedRssInMb: 350
timeout: 120m
#5000
- name: devices/5000/resources/1/size/16KB
numDevices: 5000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/1/size/1KB
numDevices: 5000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/125/size/16KB
numDevices: 5000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/125/size/1KB
numDevices: 5000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/250/size/16KB
numDevices: 5000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/250/size/1KB
numDevices: 5000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/500/size/16KB
numDevices: 5000
numResources: 500
resourceDataSize: 16384
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
- name: devices/5000/resources/500/size/1KB
numDevices: 5000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 320
expectedRssInMb: 500
timeout: 120m
#10000
- name: devices/10000/resources/1/size/16KB
numDevices: 10000
numResources: 1
resourceDataSize: 16384
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/1/size/1KB
numDevices: 10000
numResources: 1
resourceDataSize: 1024
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/125/size/16KB
numDevices: 10000
numResources: 125
resourceDataSize: 16384
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/125/size/1KB
numDevices: 10000
numResources: 125
resourceDataSize: 1024
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/250/size/16KB
numDevices: 10000
numResources: 250
resourceDataSize: 16384
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/250/size/1KB
numDevices: 10000
numResources: 250
resourceDataSize: 1024
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m
- name: devices/10000/resources/500/size/4KB
numDevices: 10000
numResources: 500
resourceDataSize: 4096
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 300m
- name: devices/10000/resources/500/size/1KB
numDevices: 10000
numResources: 500
resourceDataSize: 1024
expectedRssInMb: 530
expectedRssInMb: 800
timeout: 120m

# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
1 change: 1 addition & 0 deletions device-provisioning-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The plgd device provisioning service REST API is defined by [swagger](https://ra
| `apis.http.authorization.endpoints[].http.tls.keyFile` | string | `File path to private key in PEM format.` | `""` |
| `apis.http.authorization.endpoints[].http.tls.certFile` | string | `File path to certificate in PEM format.` | `""` |
| `apis.http.authorization.endpoints[].http.tls.useSystemCAPool` | bool | `If true, use system certification pool.` | `false` |
| `apis.http.authorization.tokenTrustVerification.cacheExpiration` | string | `Duration for which a valid token is kept in a runtime cache before re-verification is required.` | `30s` |
| `apis.http.readTimeout` | string | `Maximum duration allowed for reading the entire request body, including the body by the server. A zero or negative value means there will be no timeout. Example: "8s" (8 seconds).` | `8s` |
| `apis.http.readHeaderTimeout` | string | `The amount of time allowed to read request headers by the server. If readHeaderTimeout is zero, the value of readTimeout is used. If both are zero, there is no timeout.` | `4s` |
| `apis.http.writeTimeout` | string | `The maximum duration before the server times out writing of the response. A zero or negative value means there will be no timeout.` | `16s` |
Expand Down
4 changes: 2 additions & 2 deletions pkg/security/jwt/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, logg
keys.Add(issuer, openIDCfg.JWKSURL, httpClient.HTTP())
openIDConfigurations = append(openIDConfigurations, openIDCfg)
if openIDCfg.PlgdTokensEndpoint != "" {
if opts, ok := options.customTokenIssuerClients[issuer]; ok {
clients[issuer] = opts
if tokenIssuer, ok := options.customTokenIssuerClients[issuer]; ok {
clients[issuer] = tokenIssuer
continue
}
clients[issuer] = jwtValidator.NewHTTPClient(httpClient.HTTP(), openIDCfg.PlgdTokensEndpoint)
Expand Down

0 comments on commit 47288c5

Please sign in to comment.