Skip to content

Commit

Permalink
Added Lua and cleaned up some of the values
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenge committed Sep 5, 2024
1 parent 1971da9 commit 2d7d180
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-bdnbenchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
os: [ ubuntu-latest, windows-latest ]
framework: [ 'net8.0' ]
configuration: [ 'Release' ]
test: [ 'CI_BDN_Config_RespParseStress.json', 'CI_BDN_Config_RespTsavoriteStress.json', 'CI_BDN_Config_RespClusterBench.json', 'CI_BDN_Config_RespClusterMigrateBench.json' ]
test: [ 'CI_BDN_Config_RespParseStress.json', 'CI_BDN_Config_RespTsavoriteStress.json', 'CI_BDN_Config_RespClusterBench.json', 'CI_BDN_Config_RespClusterMigrateBench.json', 'CI_BDN_Config_Lua.json' ]
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
19 changes: 19 additions & 0 deletions test/BDNPerfTests/ConfigFiles/CI_BDN_Config_Lua.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"_comment": "To get proper expected results, the ExpectedCoresToTestOn needs to match the number of cores on test machine. NOT SURE IF CHECKING CORES",
"ExpectedCoresToTestOn_win": 2,
"ExpectedCoresToTestOn_linux": 2,
"configuration": "Release",
"framework": "net8.0",
"filter": "*Lua*",
"expectedBasicLua1MeanValue_linux": 98,
"expectedBasicLua2MeanValue_linux": 157,
"expectedBasicLua3MeanValue_linux": 611,
"expectedBasicLua4MeanValue_linux": 1308,
"expectedBasicLua1MeanValue_win": 93,
"expectedBasicLua2MeanValue_win": 157,
"expectedBasicLua3MeanValue_win": 611,
"expectedBasicLua4MeanValue_win": 1308,
"acceptableMeanRange": 10,
"acceptableError": ".1",
"acceptableStdDev": ".1"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "To get proper expected results, the ExpectedCoresToTestOn needs to match the number of cores on test machine. NOT SURE IF CHECKING CORES",
"ExpectedCoresToTestOn_win": 48,
"ExpectedCoresToTestOn_linux": 48,
"ExpectedCoresToTestOn_win": 2,
"ExpectedCoresToTestOn_linux": 2,
"configuration": "Release",
"framework": "net8.0",
"filter": "*RespClusterBench*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "To get proper expected results, the ExpectedCoresToTestOn needs to match the number of cores on test machine. NOT SURE IF CHECKING CORES",
"ExpectedCoresToTestOn_win": 48,
"ExpectedCoresToTestOn_linux": 48,
"ExpectedCoresToTestOn_win": 2,
"ExpectedCoresToTestOn_linux": 2,
"configuration": "Release",
"framework": "net8.0",
"filter": "*RespClusterMigrateBench*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"_comment": "To get proper expected results, the ExpectedCoresToTestOn needs to match the number of cores on test machine. NOT SURE IF CHECKING CORES",
"ExpectedCoresToTestOn_win": 48,
"ExpectedCoresToTestOn_linux": 48,
"ExpectedCoresToTestOn_win": 2,
"ExpectedCoresToTestOn_linux": 2,
"configuration": "Release",
"framework": "net8.0",
"filter": "*RespParseStress*",
"expectedInLinePingMeanValue_linux": 2.4,
"expectedSETMeanValue_linux": 18,
"expectedSETMeanValue_linux": 19,
"expectedSETEXMeanValue_linux": 26,
"expectedGETMeanValue_linux": 14,
"expectedZAddRemMeanValue_linux": 186,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "To get proper expected results, the ExpectedCoresToTestOn needs to match the number of cores on test machine. NOT SURE IF CHECKING CORES",
"ExpectedCoresToTestOn_win": 48,
"ExpectedCoresToTestOn_linux": 48,
"ExpectedCoresToTestOn_win": 2,
"ExpectedCoresToTestOn_linux": 2,
"configuration": "Release",
"framework": "net8.0",
"filter": "*RespTsavoriteStress*",
Expand All @@ -10,7 +10,7 @@
"expectedIncrMeanValue_linux": 29,
"expectedGETMeanValue_win": 20,
"expectedSETMeanValue_win": 17,
"expectedIncrMeanValue_win": 25,
"expectedIncrMeanValue_win": 26,
"acceptableMeanRange": 10,
"acceptableError": ".1",
"acceptableStdDev": ".1"
Expand Down
33 changes: 18 additions & 15 deletions test/BDNPerfTests/run_bdnperftest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ $OFS = "`r`n"
function AnalyzeResult {
param ($foundResultValue, $expectedResultValue, $acceptablePercentRange, $warnonly)

# Just dobule check found results
if ($foundResultsValue -eq "NA") {
Write-Host "** << Data Error! >> The BDN benchmark Mean Value is not a valid value. Mean value found: $dblfoundResultValue"
Write-Host "** "

return $false
}

# Calculate the lower and upper bounds of the expected value
[double] $Tolerance = $acceptablePercentRange / 100
[double] $LowerBound = $expectedResultValue * (1 - $Tolerance)
Expand Down Expand Up @@ -109,7 +117,6 @@ if ($IsLinux) {
$CurrentOS = "Linux"
}


# Calculate number of cores on the test machine - used for max thread and to verify the config file settings
if ($IsLinux) {
$sockets = [int]$(lscpu | grep -E '^Socket' | awk '{print $2}')
Expand All @@ -124,15 +131,16 @@ else {
$ExpectedCoresToTestOn = $object.ExpectedCoresToTestOn_win
}

# When Remove these, then set up the actual error so it fails out if cores do not match
Write-Host "---- DEBUG --- Number of Cores Found: $NumberOfCores "
Write-Host "---- DEBUG --- Expected Number of Cores: $ExpectedCoresToTestOn "

# TO DO - ENABLE THIS
# To get accurate comparison of found vs expected values, double check to make sure config settings for Number of Cores of the test machine are what is specified in the test config file
#if ($ExpectedCoresToTestOn -ne $NumberOfCores) {
if ($ExpectedCoresToTestOn -ne $NumberOfCores) {
# Write-Error -Message "The Number of Cores on this machine ($NumberOfCores) are not the same as the Expected Cores ($ExpectedCoresToTestOn) found in the test config file: $fullConfiFileAndPath."
# exit
#}
Write-Host "WARNING!!!! The Number of Cores on this machine ($NumberOfCores) are not the same as the Expected Cores ($ExpectedCoresToTestOn) found in the test config file: $fullConfiFileAndPath."
}

Write-Host "************** Start BDN.benchmark ********************"
Write-Host " "
Expand All @@ -142,8 +150,8 @@ $configuration = $object.configuration
$framework = $object.framework
$filter = $object.filter
$meanColumn = "1"
$errorColumn = "2"
$stdDevColumn = "3"
$errorColumn = "2" # TODO: Need this - check it?
$stdDevColumn = "3" # TODO: Need this - check it?

# Set the expected values based on the OS
if ($IsLinux) {
Expand Down Expand Up @@ -178,12 +186,11 @@ else {
}

# percent allowed variance when comparing expected vs actual found value - same for linux and windows.
# TO DO: Figure out if using Error and Std Dev range ... have % off of .1 or we have
# TODO: Figure out if using Error and Std Dev range ... have % off of .1 or we have
$acceptableError = $object.acceptableError
$acceptableStdDev = $object.acceptableStdDev
$acceptableStdDev = $object.acceptableStdDev
$acceptableMeanRange = $object.acceptableMeanRange


# Set up the results dir and errorlog dir
$resultsDir = "$basePath/test/BDNPerfTests/results"
if (-not (Test-Path -Path $resultsDir)) {
Expand All @@ -203,7 +210,6 @@ $resultsFileName = $justResultsFileNameNoExt + "_" + $CurrentOS + ".results"
$resultsFile = "$resultsDir/$resultsFileName"
$BDNbenchmarkErrorFile = "$errorLogDir/$justResultsFileNameNoExt" + "_StandardError_" +$CurrentOS+".log"


Write-Output "------------ DEBUG #########################"
Write-Output "*#*#* Configuration $configuration"
Write-Output "*#*#* framework $framework"
Expand All @@ -230,7 +236,6 @@ dotnet run -c $configuration -f $framework --filter $filter --project $BDNbenchm
Write-Output "** BDN Benchmark for $filter finished"
Write-Output " "


Write-Output "**** EVALUATE THE RESULTS FILE $resultsFile ****"

# First check if file is there and if not, error out gracefully
Expand All @@ -246,13 +251,12 @@ if ($resultsFileSizeBytes -eq 0) {
exit
}

# Set the test suite to pass and if any one fails, then mark the suite as fail - just one result failure will mark the whole test as failed
$testSuiteResult = $true

Write-Output "************************"
Write-Output "** RESULTS "
Write-Output "** "

# Set the test suite to pass and if any one fails, then mark the suite as fail - just one result failure will mark the whole test as failed
$testSuiteResult = $true

# Read the results file line by line and pull out the specific results if exists
Get-Content $resultsFile | ForEach-Object {
Expand Down Expand Up @@ -358,7 +362,6 @@ Get-Content $resultsFile | ForEach-Object {
}
}


Write-Output "** "
Write-Output "************************"
Write-Output "** Final summary:"
Expand Down

0 comments on commit 2d7d180

Please sign in to comment.