-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into reduce-ldap
* master: (28 commits) Feature: do dev environment via makefile (#17136) devenv: adds auth proxy load test (#17271) Table: various minor fixes (alpha panel) (#17258) Singlestat: fixes issue with value placement and line wraps (#17249) Devenv: Update Graphite port in dev datasources (#17255) Chore: bump grafana-ui version (#17256) Release: Updated latest.json Auth: Logout disabled user (#17166) docs: fixes typo in provisioning docs (#17248) CloudWatch: Made region visible for AWS Cloudwatch Expressions (#17243) Panel: Pass transparency prop down to React panels. (#17235) Build: Fix filter for building msi during release (#17236) DataSourcePlugin: Avoid anuglar injector if only one parameter (#17239) Alerting: Support for configuring content field for Discord alert notifier (#17017) Explore: Update the way Loki retrieve log context (#17204) Docs: Fix grammar in docs (#17233) LDAP: consistently name the LDAP entities (#17203) Panels: Show Drilldown links in top-left corner of custom React panels (#17142) Build: Fix final prompt for @grafana/ui npm publish confirmation Docs: Updated versions selector ...
- Loading branch information
Showing
85 changed files
with
805 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { sleep, check, group } from 'k6'; | ||
import { createBasicAuthClient } from './modules/client.js'; | ||
|
||
export let options = { | ||
noCookiesReset: true | ||
}; | ||
|
||
let endpoint = __ENV.URL || 'http://localhost:10080/grafana'; | ||
const client = createBasicAuthClient(endpoint, 'user1', 'grafana'); | ||
client.withOrgId(1); | ||
|
||
export const setup = () => { | ||
const adminClient = createBasicAuthClient(endpoint, 'admin', 'admin'); | ||
let res = adminClient.datasources.getByName('gdev-prometheus'); | ||
if (res.status !== 200) { | ||
throw new Error('Expected 200 response status when creating datasource'); | ||
} | ||
|
||
return { | ||
datasourceId: res.json().id, | ||
}; | ||
} | ||
|
||
export default (data) => { | ||
group("auth proxy test", () => { | ||
group("batch proxy requests", () => { | ||
const d = new Date(); | ||
const batchCount = 300; | ||
const requests = []; | ||
const query = encodeURI('topk(5, max(scrape_duration_seconds) by (job))'); | ||
const start = (d.getTime() / 1000) - 3600; | ||
const end = (d.getTime() / 1000); | ||
const step = 20; | ||
|
||
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=8&from=1558670300607&to=1558691900607' }); | ||
|
||
for (let n = 0; n < batchCount; n++) { | ||
requests.push({ | ||
method: 'GET', | ||
url: `/api/datasources/proxy/${data.datasourceId}/api/v1/query_range?query=${query}&start=${start}&end=${end}&step=${step}`, | ||
}); | ||
} | ||
|
||
let responses = client.batch(requests); | ||
for (let n = 0; n < batchCount; n++) { | ||
check(responses[n], { | ||
'response status is 200': (r) => r.status === 200, | ||
}); | ||
} | ||
}); | ||
}); | ||
|
||
sleep(5) | ||
} | ||
|
||
export const teardown = (data) => {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.