Ejemplo n.º 1
0
import os
os.chdir("../")

from PlotFacility.PlotService import *
import time
import random

labels = ["a","b","c","d"]
plotter = PlotService(labels,15005);

keys = [];
delay = 0.1
duration = 60;

def generateKeys(number):
	k = [];
	while number > 0:
		k.append(str(number)+"_test");
		number -= 1;
	return k;

def run_test(k,d,ttr):
	global labels;
	if len(k) == 0:
		return;
	print "Starting plot test..."
	elapsed = 0.0;
	
	while elapsed < ttr:

		data = {}
Ejemplo n.º 2
0
print "V8 Manager CLI"

port = 15004
confFile = "default.txt"

for i in range(0,len(sys.argv)):
    if sys.argv[i] == "port" and i+1 < len(sys.argv):
        port = int(sys.argv[i+1])
    
    if "config=" in sys.argv[i]:
        cfg = sys.argv[i].split("=");
        if len(cfg) > 1:
            confFile = cfg[1];

#Defaults
pltSvc = PlotService(["heap","footPrint","maxHeapSize"],15027)
pltSvc.doNormalise({"heap":1024*1024.0,"footPrint":1024*1024.0,"maxHeapSize":1024*1024.0,"throughput":1.0});

print "Initialising Registry..."
mon = monitor("MACHINE",pltSvc);
srv = server(mon,port);

if srv.start() == False:
    print "Error starting registry server - "+srv.getError();
else:
    print("Starting ...");
    time.sleep(1);
    
    print "Initialising policy...";
    #run the policy executor
    policy = Policy(mon,4,confFile);