mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-23 07:16:47 +00:00
local perf test setup
This commit is contained in:
@@ -103,12 +103,16 @@ module.exports = function(cfg) {
|
||||
debug('scenario done');
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
console.error(e);
|
||||
})
|
||||
.fail(function(err) {
|
||||
debug('exception. taking screenshot', err);
|
||||
browser.takeScreenshot(function(err, data) {
|
||||
if (err) {
|
||||
debug(err);
|
||||
} else {
|
||||
debugger;
|
||||
var base64Data = data.replace(/^data:image\/png;base64,/,"");
|
||||
fs.writeFile('90-nodes-select-' + cfg.run + '.png', base64Data, 'base64', function(err) {
|
||||
if(err) debug(err);
|
||||
|
||||
5
client/test/perfjankie/Dockerfile
Normal file
5
client/test/perfjankie/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM couchdb:1.6
|
||||
|
||||
COPY local.ini /usr/local/etc/couchdb/
|
||||
|
||||
EXPOSE 5984
|
||||
BIN
client/test/perfjankie/data/_replicator.couch
Executable file
BIN
client/test/perfjankie/data/_replicator.couch
Executable file
Binary file not shown.
BIN
client/test/perfjankie/data/_users.couch
Executable file
BIN
client/test/perfjankie/data/_users.couch
Executable file
Binary file not shown.
BIN
client/test/perfjankie/data/performance.couch
Executable file
BIN
client/test/perfjankie/data/performance.couch
Executable file
Binary file not shown.
28
client/test/perfjankie/docker-compose.yml
Normal file
28
client/test/perfjankie/docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
version : '2'
|
||||
services:
|
||||
# nginx:
|
||||
# container_name: 'nginx'
|
||||
# image: 'nginx'
|
||||
# volumes:
|
||||
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
# links:
|
||||
# - couchdb
|
||||
# ports:
|
||||
# - '5984:5984'
|
||||
selenium:
|
||||
container_name: 'selenium'
|
||||
image: 'elgalu/selenium'
|
||||
ports:
|
||||
- '4444:24444'
|
||||
- '5900:25900'
|
||||
environment:
|
||||
- TZ="US/Pacific"
|
||||
shm_size: 1g
|
||||
couchdb:
|
||||
container_name: 'couchdb'
|
||||
image: 'couchdb:1.6'
|
||||
ports:
|
||||
- '5984:5984'
|
||||
volumes:
|
||||
- ./data:/usr/local/var/lib/couchdb
|
||||
- ./local.ini:/usr/local/etc/couchdb/local.ini
|
||||
104
client/test/perfjankie/local.ini
Normal file
104
client/test/perfjankie/local.ini
Normal file
@@ -0,0 +1,104 @@
|
||||
; CouchDB Configuration Settings
|
||||
|
||||
; Custom settings should be made in this file. They will override settings
|
||||
; in default.ini, but unlike changes made to default.ini, this file won't be
|
||||
; overwritten on server upgrade.
|
||||
|
||||
[couchdb]
|
||||
;max_document_size = 4294967296 ; bytes
|
||||
uuid = 8fcf62d03c895729a02ba2922744e3e4
|
||||
|
||||
[httpd]
|
||||
;port = 5984
|
||||
;bind_address = 127.0.0.1
|
||||
; Options for the MochiWeb HTTP server.
|
||||
;server_options = [{backlog, 128}, {acceptor_pool_size, 16}]
|
||||
; For more socket options, consult Erlang's module 'inet' man page.
|
||||
;socket_options = [{recbuf, 262144}, {sndbuf, 262144}, {nodelay, true}]
|
||||
enable_cors = true
|
||||
|
||||
[cors]
|
||||
origins = *
|
||||
credentials = true
|
||||
methods = GET, POST, PUT, DELETE, HEAD
|
||||
|
||||
; Uncomment next line to trigger basic-auth popup on unauthorized requests.
|
||||
;WWW-Authenticate = Basic realm="administrator"
|
||||
|
||||
; Uncomment next line to set the configuration modification whitelist. Only
|
||||
; whitelisted values may be changed via the /_config URLs. To allow the admin
|
||||
; to change this value over HTTP, remember to include {httpd,config_whitelist}
|
||||
; itself. Excluding it from the list would require editing this file to update
|
||||
; the whitelist.
|
||||
;config_whitelist = [{httpd,config_whitelist}, {log,level}, {etc,etc}]
|
||||
|
||||
[query_servers]
|
||||
;nodejs = /usr/local/bin/couchjs-node /path/to/couchdb/share/server/main.js
|
||||
|
||||
|
||||
[httpd_global_handlers]
|
||||
;_google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
|
||||
|
||||
[couch_httpd_auth]
|
||||
; If you set this to true, you should also uncomment the WWW-Authenticate line
|
||||
; above. If you don't configure a WWW-Authenticate header, CouchDB will send
|
||||
; Basic realm="server" in order to prevent you getting logged out.
|
||||
require_valid_user = false
|
||||
|
||||
[log]
|
||||
;level = debug
|
||||
|
||||
[log_level_by_module]
|
||||
; In this section you can specify any of the four log levels 'none', 'info',
|
||||
; 'error' or 'debug' on a per-module basis. See src/*/*.erl for various
|
||||
; modules.
|
||||
;couch_httpd = error
|
||||
|
||||
|
||||
[os_daemons]
|
||||
; For any commands listed here, CouchDB will attempt to ensure that
|
||||
; the process remains alive. Daemons should monitor their environment
|
||||
; to know when to exit. This can most easily be accomplished by exiting
|
||||
; when stdin is closed.
|
||||
;foo = /path/to/command -with args
|
||||
|
||||
[daemons]
|
||||
; enable SSL support by uncommenting the following line and supply the PEM's below.
|
||||
; the default ssl port CouchDB listens on is 6984
|
||||
; httpsd = {couch_httpd, start_link, [https]}
|
||||
|
||||
[ssl]
|
||||
;cert_file = /full/path/to/server_cert.pem
|
||||
;key_file = /full/path/to/server_key.pem
|
||||
;password = somepassword
|
||||
; set to true to validate peer certificates
|
||||
verify_ssl_certificates = false
|
||||
; Path to file containing PEM encoded CA certificates (trusted
|
||||
; certificates used for verifying a peer certificate). May be omitted if
|
||||
; you do not want to verify the peer.
|
||||
;cacert_file = /full/path/to/cacertf
|
||||
; The verification fun (optional) if not specified, the default
|
||||
; verification fun will be used.
|
||||
;verify_fun = {Module, VerifyFun}
|
||||
; maximum peer certificate depth
|
||||
ssl_certificate_max_depth = 1
|
||||
|
||||
; To enable Virtual Hosts in CouchDB, add a vhost = path directive. All requests to
|
||||
; the Virual Host will be redirected to the path. In the example below all requests
|
||||
; to http://example.com/ are redirected to /database.
|
||||
; If you run CouchDB on a specific port, include the port number in the vhost:
|
||||
; example.com:5984 = /database
|
||||
[vhosts]
|
||||
;example.com = /database/
|
||||
|
||||
[update_notification]
|
||||
;unique notifier name=/full/path/to/exe -with "cmd line arg"
|
||||
|
||||
; To create an admin account uncomment the '[admins]' section below and add a
|
||||
; line in the format 'username = password'. When you next start CouchDB, it
|
||||
; will change the password to a hash (so that your passwords don't linger
|
||||
; around in plain-text files). You can add more admin accounts with more
|
||||
; 'username = password' lines. Don't forget to restart CouchDB after
|
||||
; changing this.
|
||||
;[admins]
|
||||
;admin = password
|
||||
@@ -1,11 +1,11 @@
|
||||
var perfjankie = require('perfjankie');
|
||||
|
||||
var run = process.env.COMMIT || 'commit#Hash'; // A hash for the commit, displayed in the x-axis in the dashboard
|
||||
var run = process.env.COMMIT || 'commit#590f0078e79e9fb968c8b9f8e5e5ce0a96fa4825'; // A hash for the commit, displayed in the x-axis in the dashboard
|
||||
var time = process.env.DATE || new Date().getTime() // Used to sort the data when displaying graph. Can be the time when a commit was made
|
||||
var scenario = process.env.ACTIONS || '90-nodes-select';
|
||||
var host = process.env.HOST || 'localhost:4040';
|
||||
var actions = require('../actions/' + scenario)({host: host, run: run});
|
||||
|
||||
debugger;
|
||||
perfjankie({
|
||||
/* The next set of values identify the test */
|
||||
suite: 'Scope',
|
||||
@@ -16,7 +16,7 @@ perfjankie({
|
||||
|
||||
/* Identifies where the data and the dashboard are saved */
|
||||
couch: {
|
||||
server: 'http://local.docker:5984',
|
||||
server: 'http://localhost:5984',
|
||||
database: 'performance'
|
||||
// updateSite: !process.env.CI, // If true, updates the couchApp that shows the dashboard. Set to false in when running Continuous integration, run this the first time using command line.
|
||||
// onlyUpdateSite: false // No data to upload, just update the site. Recommended to do from dev box as couchDB instance may require special access to create views.
|
||||
|
||||
12
client/test/perfjankie/out.json
Normal file
12
client/test/perfjankie/out.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user