cBench Python package¶
Submodules¶
cbench.client module¶
-
class
cbench.client.
ThreadedHTTPServer
(server_address, RequestHandlerClass, bind_and_activate=True)[source]¶
-
class
cbench.client.
server_handler
(request, client_address, server)[source]¶ Bases:
http.server.BaseHTTPRequestHandler
Input: Python http handler Output: None
cbench.comm module¶
-
cbench.comm.
access
(i)[source]¶ - Input: {
- (filename) [str] - load JSON from this file
or
- (json) [str] - parse JSON string from command line (use ‘ instead of “)
or
(dict) [dict] - dictionary to send to the cK API
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.comm.
download_file
(i)[source]¶ - Input: {
url [str] - full URL for a file to download file [dict] - file to save
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
file_size - size of retreived file
}
-
cbench.comm.
send
(i)[source]¶ - Input: {
action [str] - remote API action name config [dict] - configuration for remote server dict [dict] - dict to send to remote server ownership [dict] - info about user ownership
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
cbench.comm_min module¶
cbench.config module¶
-
cbench.config.
get_work_dir
(i)[source]¶ - Input: {
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
path [str] - path to work dir
}
cbench.graph module¶
-
cbench.graph.
init
(i)[source]¶ - Input: {
uid [str] - graph identifyer (version) [str] - graph version (desc_file) [str] - file with graph description (tags) [str] - tags separated by comma
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
dict [dict] - configuration dictionary path [str] - path to CK cfg entry
}
-
cbench.graph.
push
(i)[source]¶ - Input: {
uid [str] - graph identifyer (version) [str] - graph version (filename) [str] - JSON file with results (json) [str] - JSON string from command line (use ‘ instead of “) (point) [str] - specific point name to add/update
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
dict [dict] - configuration dictionary path [str] - path to CK cfg entry
}
cbench.obj module¶
-
cbench.obj.
delete
(i)[source]¶ - Input: {
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.obj.
download
(i)[source]¶ - Input: {
- components - pre-loaded components from bootstrapping
or
- cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
(can use wildcards)
(version) [str] - assign version (force) [bool] - if True, force download even if components already exists
(tags) [str] - can search by tags (usually soft/package)
(all) [bool] - if True, download dependencies (without force!)
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.obj.
open_page
(i)[source]¶ - Input: {
cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.obj.
publish
(i)[source]¶ - Input: {
- cid [str] - CK CID of format (repo UOA:)module UOA:data UOA
(can use wildcards)
(tags) [str] - search multiple CK components by these tags separated by comma (version) [str] - assign version
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
cbench.setup module¶
cbench.solution module¶
-
cbench.solution.
activate
(i)[source]¶ - Input: {
uid [str] - portal identifier of the solution
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.solution.
benchmark
(i)[source]¶ - Input: {
uid [str] - Portal identifier of the solution
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.solution.
deps_summary
(i)[source]¶ - Input: {
deps - resolved deps
}
- Output: {
- return - return code = 0, if successful
> 0, if error
(error) - error text if return > 0
deps_summary - summary of deps
}
-
cbench.solution.
find
(i)[source]¶ - Input: {
uid [str] - Portal identifier of the solution
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.solution.
init
(i)[source]¶ - Input: {
uid [str] - platform identifier of the solution
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.solution.
ls
(i)[source]¶ - Input: {
(uid) [str] - portal identifier of the solution (can have wiledcards)
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}
-
cbench.solution.
publish_result
(i)[source]¶ - Input: {
uid [str] - portal identifier of the solution
}
- Output: {
return [int] - return code = 0 if success or >0 if error (error) [str] - error string if return>0
}