# <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()
Exemple #2
0
#!/usr/bin/python
# expView [ <expId_spec> ] [ <viewType> ] [ -m <expMetric_list> ] [ <target_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_viewtype = openss.ViewTypeList("pcsamp")
my_metric_list = openss.MetricList(["pcsamp", "time"])

openss.expGo()
wait_mod = openss.ModifierList("terminate")
#openss.wait(wait_mod)
openss.wait()
#openss.waitForGo()
openss.dumpView()

#openss.expView(my_expid)

#openss.expView(my_expid,my_viewtype)

#ret = openss.expView(my_expid,my_viewtype,my_metric_list)

# Dump the raw return data.
#print ret
Exemple #3
0
# <listOf_expId> = listExp

import openss

list_type = openss.ModifierList("exptypes")

#try:
#    output = openss.list(list_type)
#    print "expect None"
#    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
Exemple #4
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()
Exemple #5
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()
Exemple #6
0
# expGo [ <expId_spec> || all ]

import openss

##################################################################
#
##################################################################

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

my_modifer = openss.ModifierList()
my_modifer += "all"

try:
    openss.expGo(exp1, my_modifer)
    openss.waitForGo()
except openss.error:
    print "expGo(exp1,my_modifer) failed as it should"

print "after expgo #1"

# If we don't pause we may get an exception
# if the experiment has already terminated.
openss.expGo(my_modifer)
openss.expPause()
print "after expgo #2"

openss.expGo(exp1)
# 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:
Exemple #8
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()
Exemple #9
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
# <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
Exemple #11
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()
Exemple #12
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)
Exemple #13
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()
Exemple #14
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()
Exemple #15
0
# expSave [ <expId_spec> ] [ copy ] <file_spec>

import openss
import os

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

openss.expGo()
openss.wait()

my_modifer = openss.ModifierList("copy")

my_file = openss.FileList("file_1.dat")
os.system("rm -f file_1.dat")
os.system("ls file_1.dat")

openss.expSave(my_expid, my_modifer, my_file)
os.system("ls file_1.dat")

my_file = openss.FileList("file_2.dat")
os.system("rm -f file_2.dat")
openss.expSave(my_modifer, my_file)
os.system("ls file_2.dat")

my_file = openss.FileList("file_3.dat")
os.system("rm -f file_3.dat")
openss.expSave(my_expid, my_file)
os.system("ls file_3.dat")