Commit 6bbd3d34 authored by adamk's avatar adamk
Browse files

benchmarking scenarios, paths unified

parent e42de19e
# Root logger option
log4j.rootLogger=INFO, stdout
log4j.logger.cz.muni.fi.lasaris.sbms.semantics=DEBUG
log4j.logger.org.apache.jena=DEBUG
log4j.logger.org.apache.jena=INFO
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
......
......@@ -6,5 +6,5 @@ auth.propertiesAuth.roles.user=user|adam
auth.propertiesAuth.roles.admin=admin
#tdb.path=C:/Skola/sbms/data/perf_test/tdb
#tdb.path=C:/apache-tomcat-9.0.0.M19/webapps/sbms/WEB-INF/tdb
tdb.path=C:/Skola/sbms/tdb
\ No newline at end of file
tdb.path=C:/apache-tomcat-9.0.0.M19/webapps/sbms/WEB-INF/tdb
#tdb.path=C:/Skola/sbms/tdb
\ No newline at end of file
[CmdletBinding()]
Param([switch]$ManageTomcat,
[String]$TomcatHome = "\apache-tomcat-9.0.0.M19"
[String]$TomcatHome = "\apache-tomcat-9.0.0.M19",
[String]$User = "admin",
[String]$Pass = "nimda"
)
#Measure-Command { Invoke-WebRequest -URI http://localhost:8080/sbms/semantics/types/type } Select-Object TotalSeconds
Function Get-Auth($user, $pass) {
$pair = "${user}:${pass}"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$basicAuthValue = "Basic $base64"
return @{ Authorization = $basicAuthValue }
}
Function Request($url) {
Function Request($testName, $auth, $url) {
#"Sending..." + [System.DateTime]::Now
$start = [System.DateTime]::Now
$r = Invoke-WebRequest -URI $url | Select-Object StatusCode, Content
$r = Invoke-WebRequest -Method Get -URI $url -Headers $auth | Select-Object StatusCode, Content
$end = [System.DateTime]::Now.Subtract($start) #| Select-Object TotalSeconds
$dur = $end.TotalSeconds
$dur.ToString() + ";" + $r.StatusCode + ";" + $r.Content.Length + ";" + $url
[System.String]::Format("{0:00.00}",$dur) + ";" + $testName + ";" + $r.StatusCode + ";" + $count
}
......@@ -28,11 +39,23 @@ if($ManageTomcat) {
}
"duration;statusCode;contentLength;request"
"duration;testName;statusCode;contentLength"
#initial request -- to init the tdb and mode
Request "0: Init" $auth "http://localhost:8080/sbms/semantics/types/type"
$auth = Get-Auth $User $Pass
Request "1: All information about a DP" $auth "http://localhost:8080/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Csource.bimId%2Csource.type%2Csource.location%2Cscope.bimId%2Cscope.type%2Cscope.location%2Csensing.type%2Csensing.window%2Cproperty.domain%2Cproperty.quality%2Cpublisher.bimId&bmsId=bacnet%3A%2F%2F04010306.AV1"
Request "2: All DPs according to strict criteria + grouping" $auth "http://localhost:8080/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.floor&type=Input&source.type=TemperatureSensor&source.location=S01B04&scope.type=Room&property.domain=Air&property.quality=temperature"
Request "3: Generic query with large number of results + grouping" $auth "http://localhost:8080/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.building&source.type=HumiditySensor&property.domain=Air"
Request "4: Generic query with large number of results + datapoint type + grouping" $auth "http://localhost:8080/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Cscope.bimId&grouping=scope.building&source.type=TemperatureSensor&property.domain=Air&property.quality=temperature"
Request http://localhost:8080/sbms/semantics/types/type
Request "5: Generic query with large number of results + all available information + grouping" $auth "http://localhost:8080/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Csource.bimId%2Csource.type%2Csource.location%2Cscope.bimId%2Cscope.type%2Cscope.location%2Csensing.type%2Csensing.window%2Cproperty.domain%2Cproperty.quality%2Cpublisher.bimId&grouping=scope.building&source.type=TemperatureSensor&property.domain=Air&property.quality=temperature"
Request http://localhost:8080/sbms/semantics/types/type
if($ManageTomcat) {
Pause
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment