예제 #1
0
# <ListOf_threadname> = listThreads [ <expId_spec> ] [ <host_list_spec> ]

import openss

my_id = openss.expCreate()
my_host = openss.HostList(["localhost"])
#my_host = openss.HostList(["host1,host2"])

my_file = openss.FileList("../../usability/phaseII/fred 900")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file,my_exptype,my_host)

list_type = openss.ModifierList("threads")

output = openss.list(list_type)
print output

output = openss.list(list_type,my_id)
print output

output = openss.list(list_type,my_host)
print output

output = openss.list(list_type,my_id,my_host)
print output

예제 #2
0
# expDetach [ <expId_spec> ] [ <target_list> ] [ <expType_list> ]

import openss

try :
    # Create an experiment with pcsamp being the experiment type
    my_file = openss.FileList("../../usability/phaseII/fred 750")
    my_exptype = openss.ExpTypeList("pcsamp")
    exp_id = openss.expCreate(my_file,my_exptype)

    # print out the type
    exp_mod = openss.ModifierList("types")
    print "This should say [pcsamp]: ", openss.list(exp_mod)
    
    openss.expDetach(exp_id,my_exptype)
    print "This should say []: ", openss.list(exp_mod)
    
    my_exptype = openss.ExpTypeList("usertime")
    openss.expAttach(exp_id,my_exptype)
    print "This should say [usertime]: ", openss.list(exp_mod)
    
    openss.expGo(exp_id)
    openss.wait()

    print openss.expView()
    openss.wait() # kluge for delayed exception
    
except openss.error,message:
    print "ERROR: ", message

openss.exit()
예제 #3
0
# expDisable [ <expId_spec> || all ]

import openss

try :
    # Create an experiment with pcsamp being the experiment type
    my_file = openss.FileList("../../usability/phaseII/fred 700")
    my_exptype = openss.ExpTypeList("pcsamp")
    exp_id = openss.expCreate(my_file,my_exptype)

    # print out the status
    exp_mod = openss.ModifierList("status")
    print "This should say []: ", openss.list(exp_mod)
    
    openss.expDisable(exp_id)
    openss.expGo(exp_id)
    print "This should say []: ", openss.list(exp_mod)
    
    openss.waitForGo()
    print "This should say []: ", openss.list(exp_mod)

    try:
    	data = openss.expView()
    	if (data  == None):
    	    print "PASSED"
	    openss.wait() # kluge for late exception return
    	else:
    	    print "FAILED"
    except openss.error,message:
    	print "Expected: ", message
예제 #4
0
# behavior will allow the expSetParam to return
# before the error handling within openss determines
# that there is an error and throws an exception.
#
# That is why we have the series of try/except segments.
#
print "before #1"
try:
    openss.expSetParam(my_expid, my_param_list)
    os.system("sleep 3")
except openss.error, message:
    print "#1 expected ERROR: ", message

print "before #2"
try:
    openss.list(openss.ModifierList("exptypes"))
except openss.error, message:
    print "#2 expected ERROR: ", message

print "before #3"
try:
    os.system("sleep 3")
except openss.error, message:
    print "#3 expected ERROR: ", message

my_modifier = openss.ModifierList("params")
output = openss.list(my_modifier)
print output

print "before #4"
try:
예제 #5
0
# <ListOf_breakId> = listBreaks [ <expId_spec> || all ]

import openss

list_type = openss.ModifierList("breaks")

my_file = openss.FileList("../../usability/phaseII/fred 90")
my_viewtype = openss.ViewTypeList("pcsamp")
exp1 = openss.expCreate(my_file,my_viewtype)

my_modifer = openss.ModifierList("all")

output = openss.list(list_type,my_modifer)
print output

output = openss.list(list_type,exp1)
print output

output = openss.list(list_type)
print output

openss.exit()
예제 #6
0
# <ListOf_viewType> = list -v exptype [ <expId_spec> || all || <expType_list> ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred 900")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file,my_exptype)

my_modifer = openss.ModifierList("all")
list_type = openss.ModifierList("views")

output = openss.list(my_modifer,list_type)
print output

output = openss.list(my_expid,list_type)
print output

output = openss.list(my_exptype,list_type)
print output

output = openss.list(list_type)
print output

openss.exit()
예제 #7
0
# expClose [ <expId_spec> || all ] [ kill ]

import openss

try:

    my_file = openss.FileList("../../usability/phaseII/fred")
    my_viewtype = openss.ViewTypeList("pcsamp")
    openss.expCreate(my_file, my_viewtype)

    exp_mod = openss.ModifierList("exp")
    print "Current focused expId: ", openss.list(exp_mod)
    openss.expGo()
    openss.waitForGo()

    print "Current focused expId: ", openss.list(exp_mod)

    openss.expClose()

    print "Current focused expId: ", openss.list(exp_mod)

except openss.error, message:
    print "ERROR: ", message

openss.exit()

#exp1 = openss.ExpId(7)
#my_modifer = openss.ModifierList("all")
#openss.expClose(exp1,my_modifer)
#my_modifer = openss.ModifierList("kill")
#openss.expClose(my_modifer)
예제 #8
0
# <ListOf_viewType> = list -v exptype [ <expId_spec> || all || <expType_list> ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred 900")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file, my_exptype)

my_modifer = openss.ModifierList("all")
list_type = openss.ModifierList("views")

output = openss.list(my_modifer, list_type)
print output

output = openss.list(my_expid, list_type)
print output

output = openss.list(my_exptype, list_type)
print output

output = openss.list(list_type)
print output

openss.exit()
예제 #9
0
# <ListOf_pidname> = listPids [ <expId_spec> ] [ <host_list_spec> ]

import openss

list_type = openss.ModifierList("pids")

my_file = openss.FileList("../../usability/phaseII/fred 800 ")
my_type = "pcsamp"
my_host = openss.HostList("localhost")
my_id = openss.expCreate(my_file,my_type,my_host)

openss.expGo()
openss.wait()

output = openss.list(list_type)
print output

output = openss.list(list_type,my_id)
print output

#output = openss.list(list_type,my_host)
#print output

openss.exit()
예제 #10
0
# <ListOf_pidname> = listPids [ <expId_spec> ] [ <host_list_spec> ]

import openss

list_type = openss.ModifierList("pids")

my_file = openss.FileList("../../usability/phaseII/fred 800 ")
my_type = "pcsamp"
my_host = openss.HostList("localhost")
my_id = openss.expCreate(my_file, my_type, my_host)

openss.expGo()
openss.wait()

output = openss.list(list_type)
print output

output = openss.list(list_type, my_id)
print output

#output = openss.list(list_type,my_host)
#print output

openss.exit()
예제 #11
0
# behavior will allow the expSetParam to return
# before the error handling within openss determines
# that there is an error and throws an exception.
#
# That is why we have the series of try/except segments.
#
print "before #1"
try :
    openss.expSetParam(my_expid,my_param_list)
    os.system("sleep 3")
except openss.error,message:
    print "#1 expected ERROR: ", message

print "before #2"
try :
    openss.list(openss.ModifierList("exptypes"))
except openss.error,message:
    print "#2 expected ERROR: ", message


print "before #3"
try :
    os.system("sleep 3")
except openss.error,message:
    print "#3 expected ERROR: ", message

my_modifier = openss.ModifierList("params")
output = openss.list(my_modifier)
print output

print "before #4"
예제 #12
0
# expEnable [ <expId_spec> || all ]

import openss

# First time disable the data collection.
try :
    # Create an experiment with pcsamp being the experiment type
    my_file = openss.FileList("../../usability/phaseII/fred 900")
    my_exptype = openss.ExpTypeList("pcsamp")
    exp_id = openss.expCreate(my_file,my_exptype)

    # print out the status
    exp_mod = openss.ModifierList("status")
    print "This should say ['Paused']: ", openss.list(exp_mod)
    
    openss.expDisable(exp_id)
    openss.expGo(exp_id)
    print "This should say ['Running']: ", openss.list(exp_mod)
    
    openss.wait()
    print "This should say ['Terminated']: ", openss.list(exp_mod)

#    openss.expEnable(exp_id)
#    openss.expGo(exp_id)
#    print "This should say ['Running']: ", openss.list(exp_mod)
#    
#    openss.wait()
#    print "This should say ['Terminated']: ", openss.list(exp_mod)

    try:
    	data = openss.expView()
예제 #13
0
# <ListOf_hostname> = listHosts [ <expId_spec> ]


import openss

list_type = openss.ModifierList("hosts")

my_file = openss.FileList("../../usability/phaseII/fred")
my_viewtype = openss.ViewTypeList()
my_viewtype += "pcsamp"
my_id = openss.expCreate(my_file,my_viewtype)

output = openss.list(my_id,list_type)
print output
output = openss.list(list_type)
print output
openss.expGo()
output = openss.list(list_type)
print output
openss.exit()
예제 #14
0
# <ListOf_filename> = listObj [ <expId_spec> ] [ <target> ]

import openss

list_type = openss.ModifierList("obj")

my_viewtype = openss.ViewTypeList("pcsamp")
my_file = openss.FileList("../../usability/phaseII/fred")

my_id = openss.expCreate(my_file, my_viewtype)

ret = openss.list(list_type)

print " "
print ret
print " "

r_count = len(ret)
for row_ndx in range(r_count):
    print ret[row_ndx]

openss.exit()
예제 #15
0
#    print output
#except openss.error,message:
#    print message

my_file = openss.FileList("../../usability/phaseII/fred")

# Define pcsamp experiment
pcsamp_viewtype = openss.ViewTypeList()

pcsamp_viewtype += "pcsamp"

pcsamp_expid = openss.expCreate(my_file,pcsamp_viewtype)

# Define usertime experiment
user_viewtype = openss.ViewTypeList()
user_viewtype += "usertime"
user_expid = openss.expCreate(my_file,user_viewtype)

output = openss.list(list_type)
print "expect usertime"
print output

output = openss.list(list_type,pcsamp_expid)
print "expect pcsamp"
print output

output = openss.list(list_type,user_expid)
print "expect usertime"
print output

예제 #16
0
# <ListOf_statusType> = listStatus [ <expId_spec> || all ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred")

list_type = openss.ModifierList("status")

# Define and run pcsamp experiment
pcsamp_viewtype = openss.ViewTypeList()
pcsamp_viewtype += "pcsamp"
pcsamp_expid = openss.expCreate(my_file, pcsamp_viewtype)
openss.expGo()
output = openss.list(list_type, pcsamp_expid)
print "expect Running"
print output
openss.wait()

user_viewtype = openss.ViewTypeList()
user_viewtype += "usertime"
user_expid = openss.expCreate(my_file, user_viewtype)

output = openss.list(list_type, user_expid)
print "expect Paused"
print output
output = openss.list(list_type, pcsamp_expid)
print "expect Terminated"
print output

openss.expGo()
openss.wait()
예제 #17
0
# <listOf_filename> = listSrc [ <expId_spec> ] [ <target> ] 

import openss

list_type = openss.ModifierList("src")

my_viewtype = openss.ViewTypeList("pcsamp")
my_file = openss.FileList("../../usability/phaseII/fred")

my_id	= openss.expCreate(my_file,my_viewtype)
my_host = openss.HostList(["localhost"])

ret = openss.list(list_type)

#output = openss.listSrc(my_id)
#output = openss.listSrc(my_host)
#output = openss.listSrc(my_id,my_host)

print " "
print ret
print " "

r_count = len(ret)
for row_ndx in range(r_count):
   print ret[row_ndx]

openss.exit()
예제 #18
0
# <ListOf_expParam> = listParams [ <expId_spec> || all || <expType_list> ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file,my_exptype)

my_exptype = openss.ExpTypeList("pcsamp")
my_modifier = openss.ModifierList("params")

output = openss.list(my_modifier)
print output

output = openss.list(my_modifier,my_expid)
print output

output = openss.list(my_modifier,my_exptype)
print output

my_modifier += "all"
output = openss.list(my_modifier)
print output

openss.exit()
예제 #19
0
# expDisable [ <expId_spec> || all ]

import openss

try:
    # Create an experiment with pcsamp being the experiment type
    my_file = openss.FileList("../../usability/phaseII/fred 700")
    my_exptype = openss.ExpTypeList("pcsamp")
    exp_id = openss.expCreate(my_file, my_exptype)

    # print out the status
    exp_mod = openss.ModifierList("status")
    print "This should say []: ", openss.list(exp_mod)

    openss.expDisable(exp_id)
    openss.expGo(exp_id)
    print "This should say []: ", openss.list(exp_mod)

    openss.waitForGo()
    print "This should say []: ", openss.list(exp_mod)

    try:
        data = openss.expView()
        if (data == None):
            print "PASSED"
            openss.wait()  # kluge for late exception return
        else:
            print "FAILED"
    except openss.error, message:
        print "Expected: ", message
예제 #20
0
# <ListOf_expParam> = listParams [ <expId_spec> || all || <expType_list> ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred")
my_exptype = openss.ExpTypeList("pcsamp")
my_expid = openss.expCreate(my_file, my_exptype)

my_exptype = openss.ExpTypeList("pcsamp")
my_modifier = openss.ModifierList("params")

output = openss.list(my_modifier)
print output

output = openss.list(my_modifier, my_expid)
print output

output = openss.list(my_modifier, my_exptype)
print output

my_modifier += "all"
output = openss.list(my_modifier)
print output

openss.exit()
예제 #21
0
# <ListOf_expType> = listTypes [ <expId_spec> || all ]

import openss

my_file = openss.FileList("../../usability/phaseII/fred")

# Define and run pcsamp experiment
pcsamp_viewtype = openss.ViewTypeList()
pcsamp_viewtype += "pcsamp"
pcsamp_expid = openss.expCreate(my_file, pcsamp_viewtype)
openss.expGo()
openss.wait()

user_viewtype = openss.ViewTypeList()
user_viewtype += "usertime"
user_expid = openss.expCreate(my_file, user_viewtype)
openss.expGo()
openss.wait()

list_type = openss.ModifierList("types")

my_modifer = openss.ModifierList("all")
output = openss.list(list_type, my_modifer)
print output

output = openss.list(list_type)
print output

output = openss.list(list_type, pcsamp_expid)
print output
예제 #22
0
# <ListOf_expMetric> = listMetrics [ <expId_spec> || all || <expType_list> ]

import openss

list_type = openss.ModifierList("metrics")

my_file = openss.FileList("../../usability/phaseII/fred")
my_exptype = openss.ViewTypeList("pcsamp")
my_id = openss.expCreate(my_file, my_exptype)

my_modifer = openss.ModifierList("all")

output = openss.list(list_type)
print output
output = openss.list(list_type, my_id)
print output
output = openss.list(list_type, my_exptype)
print output
output = openss.list(list_type, my_modifer)
print output

openss.exit()
예제 #23
0
# expClose [ <expId_spec> || all ] [ kill ]

import openss

try :

    my_file = openss.FileList("../../usability/phaseII/fred")
    my_viewtype = openss.ViewTypeList("pcsamp")
    openss.expCreate(my_file,my_viewtype)
    
    exp_mod = openss.ModifierList("exp")
    print "Current focused expId: ", openss.list(exp_mod)
    openss.expGo()
    openss.waitForGo()

    print "Current focused expId: ",openss.list(exp_mod)

    openss.expClose()

    print "Current focused expId: ",openss.list(exp_mod)



except openss.error,message:
    print "ERROR: ", message

openss.exit()

#exp1 = openss.ExpId(7)
#my_modifer = openss.ModifierList("all")
#openss.expClose(exp1,my_modifer)