This commit is contained in:
Ben 2024-07-24 16:06:45 +02:00
parent 8f16699bab
commit ae4d782566
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B
3 changed files with 24 additions and 14 deletions

View File

@ -134,15 +134,16 @@ namespace CodexPlugin
public void LogDiskSpace(string msg)
{
try
{
var diskInfo = tools.CreateWorkflow().ExecuteCommand(Container.Containers.Single(), "df", "--sync");
Log($"{msg} - Disk info: {diskInfo}");
}
catch (Exception e)
{
Log("Failed to get disk info: " + e);
}
what to do with this?
//try
//{
// var diskInfo = tools.CreateWorkflow().ExecuteCommand(Container.Containers.Single(), "df", "--sync");
// Log($"{msg} - Disk info: {diskInfo}");
//}
//catch (Exception e)
//{
// Log("Failed to get disk info: " + e);
//}
}
public void DeleteRepoFolder()

View File

@ -24,7 +24,7 @@ namespace CodexTests.ScalabilityTests
var uploadLog = Ci.DownloadLog(hosts[0]);
var expectedNumberOfBlocks = RoundUp(fileSize.MB().SizeInBytes, 64.KB().SizeInBytes) + 1; // +1 for manifest block.
var blockCids = uploadLog
.FindLinesThatContain("Putting block into network store")
.FindLinesThatContain("Block Stored")
.Select(s =>
{
var start = s.IndexOf("cid=") + 4;
@ -44,9 +44,16 @@ namespace CodexTests.ScalabilityTests
var downloadLog = Ci.DownloadLog(client);
var host = string.Empty;
var blockCidHostMap = new Dictionary<string, string>();
var blockIndexHostMap = new Dictionary<int, string>();
downloadLog.IterateLines(line =>
{
// Received blocks from peer
// topics="codex blockexcengine"
// tid=1
// peer=16U*5ULEov
// blocks="treeCid: zDzSvJTfBgds9wsRV6iB8ZVf4fL6Nynxh2hkJSyTH4j8A9QPucyU, index: 1597"
// count=28138
if (line.Contains("peer=") && line.Contains(" len="))
{
var start = line.IndexOf("peer=") + 5;

View File

@ -14,15 +14,17 @@ namespace CodexTests.BasicTests
[Test]
[Combinatorial]
public void MarketplaceExample(
[Values(4, 8, 16 /* 1mb */, 32)] int numBlocks,
[Values(-3, -2, -1, 0, 1, 2, 3)] int plusSizeKb
[Values(4, 8, 16 /* 1mb */, 32, 64)] int numBlocks,
[Values(-3, -2, -1, 0, 1, 2, 3)] int plusSizeKb,
[Values(-3, -2, -1, 0, 1, 2, 3)] int plusSizeBytes
)
{
var hostInitialBalance = 234.TstWei();
var clientInitialBalance = 100000.TstWei();
var fileSize = new ByteSize(
numBlocks * (64 * 1024) +
plusSizeKb * 1024
plusSizeKb * 1024 +
plusSizeBytes
);
var geth = Ci.StartGethNode(s => s.IsMiner().WithName("disttest-geth"));