public BenchmarkResult Run(int size) { _logger.LogInformation("Running JsonLd Hashing Block Creation Benchmark Service..."); _logger.LogDebug("Config info:"); _logger.LogDebug("\trepository.repositoryUrl={0}", _repositoryUrl); _logger.LogDebug("\tbenchmark.clearRepositoryAfterTest={0}", _clearRepositoryAfterTest); _logger.LogDebug("\tbenchmark.rdfFilesPath={0}", _rdfFilesPath); _logger.LogDebug("\tsize={0}", size); var filesContent = _readFileService.ReadFilesContent(_rdfFilesPath, size); _logger.LogDebug("Testing {0} graphs...", filesContent.Count); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); RunBenchmark(filesContent); stopWatch.Stop(); if (_clearRepositoryAfterTest) { _blockService.ClearRepository(); } return(new BenchmarkResult(filesContent.Count, stopWatch.ElapsedMilliseconds)); }
public void Run(int size) { _logger.LogDebug("Running {0}...", GetType().Name); _logger.LogDebug("Config info:"); _logger.LogDebug("\trepository.repositoryUrl={0}", _repositoryUrl); _logger.LogDebug("\tbenchmark.rdfFilesPath={0}", _rdfFilesPath); _logger.LogDebug("\tsize={0}", size); var filesContent = _readFileService.ReadFilesContent(_rdfFilesPath, size); foreach (var fileContent in filesContent) { try { Block block = _blockService.CreateBlock( fileContent.Key, fileContent.Value, RdfFormat.TURTLE); } catch (CreatingBlockException ex) { throw new BenchmarkException("Exception was thrown while creating block.", ex); } } _logger.LogDebug("Finishing running {}...", GetType().Name); }
public override BenchmarkResult Run(int size) { _logger.LogDebug("Starting Elephant Benchmark App..."); _logger.LogDebug("Config info:"); _logger.LogDebug("\tsize={0}", size); Dictionary <string, string> filesContent = _readFileService.ReadFilesContent(_rdfFilesPath, size); _logger.LogDebug("Testing hashing speed for {0} graphs...", size); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); RunBenchmark(filesContent); stopWatch.Stop(); return(new BenchmarkResult(size, stopWatch.ElapsedMilliseconds)); }
public override BenchmarkResult Run(int size) { _logger.LogDebug("Running JsonLd Hashing Benchmark Service..."); _logger.LogDebug("Config info:"); _logger.LogDebug("\tsize={0}", size); var filesContent = _readFileService.ReadFilesContent(_rdfFilesPath, size); _logger.LogDebug("Testing hashing speed for {0} graphs...", size); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); RunBenchmark(filesContent); stopWatch.Stop(); return(new BenchmarkResult(size, stopWatch.ElapsedMilliseconds)); }