mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Fix metrics rebase
This commit is contained in:
@@ -148,7 +148,7 @@ export default class NodesChart extends React.Component {
|
||||
initNodes(topology, stateNodes) {
|
||||
let nextStateNodes = stateNodes;
|
||||
|
||||
// remove nodes that have dissappeared
|
||||
// remove nodes that have disappeared
|
||||
stateNodes.forEach((node, id) => {
|
||||
if (!topology.has(id)) {
|
||||
nextStateNodes = nextStateNodes.delete(id);
|
||||
@@ -163,6 +163,7 @@ export default class NodesChart extends React.Component {
|
||||
pseudo: node.get('pseudo'),
|
||||
subLabel: node.get('label_minor'),
|
||||
nodeCount: node.get('node_count'),
|
||||
metrics: node.get('metrics'),
|
||||
rank: node.get('rank'),
|
||||
shape: node.get('shape'),
|
||||
stack: node.get('stack')
|
||||
@@ -310,6 +311,9 @@ export default class NodesChart extends React.Component {
|
||||
|
||||
const stateNodes = this.initNodes(props.nodes, state.nodes);
|
||||
const stateEdges = this.initEdges(props.nodes, stateNodes);
|
||||
const nodeMetrics = stateNodes.map(node => makeMap({
|
||||
metrics: node.get('metrics')
|
||||
}));
|
||||
const nodeScale = this.getNodeScale(props);
|
||||
const nextState = { nodeScale };
|
||||
|
||||
@@ -330,9 +334,7 @@ export default class NodesChart extends React.Component {
|
||||
|
||||
// inject metrics and save coordinates for restore
|
||||
const layoutNodes = graph.nodes
|
||||
.mergeDeep(stateNodes.map(node => makeMap({
|
||||
metrics: node.get('metrics')
|
||||
})))
|
||||
.mergeDeep(nodeMetrics)
|
||||
.map(node => node.merge({
|
||||
px: node.get('x'),
|
||||
py: node.get('y')
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable */
|
||||
|
||||
var fs = require('fs');
|
||||
var debug = require('debug')('scope:test:action:90-nodes-select');
|
||||
|
||||
@@ -31,7 +33,8 @@ module.exports = function(cfg) {
|
||||
return browser.sleep(2000);
|
||||
})
|
||||
.then(function() {
|
||||
return browser.elementByCssSelector('.debug-panel div:nth-child(2) button:nth-child(9)');
|
||||
return browser.elementByCssSelector('.debug-panel button:nth-child(5)');
|
||||
// return browser.elementByCssSelector('.debug-panel div:nth-child(2) button:nth-child(9)');
|
||||
})
|
||||
.then(function(el) {
|
||||
debug('debug-panel found');
|
||||
|
||||
@@ -1,16 +1,34 @@
|
||||
#!/bin/bash
|
||||
# run jankie on one commit
|
||||
|
||||
# These need to be running:
|
||||
#
|
||||
# docker run --net=host -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:2.52.0
|
||||
# docker run -d -p 5984:5984 --name couchdb klaemo/couchdb
|
||||
#
|
||||
# Initialize the results DB
|
||||
#
|
||||
# perfjankie --only-update-site --couch-server http://local.docker:5984 --couch-database performance
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ./run-jankie.sh 192.168.64.3:4040
|
||||
#
|
||||
# View results: http://local.docker:5984/performance/_design/site/index.html
|
||||
#
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
HOST=$1
|
||||
COMMIT=$2
|
||||
DATE=$3
|
||||
HOST="$1"
|
||||
DATE=$(git log --format="%at" -1)
|
||||
COMMIT=$(git log --format="%h" -1)
|
||||
|
||||
git checkout $COMMIT
|
||||
echo "Testing $COMMIT on $DATE"
|
||||
|
||||
../../scope stop
|
||||
make SUDO= -C ../..
|
||||
../../scope stop && ../../scope launch
|
||||
|
||||
../../scope launch
|
||||
sleep 5
|
||||
|
||||
COMMIT=$COMMIT DATE=$DATE HOST=$HOST DEBUG=scope* node ./perfjankie/main.js
|
||||
COMMIT="$COMMIT" DATE=$DATE HOST=$HOST DEBUG=scope* node ./perfjankie/main.js
|
||||
|
||||
Reference in New Issue
Block a user