mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
[Benchmark] Don't take into account "first" iteration
This commit is contained in:
@@ -33,6 +33,7 @@ class CompBz2: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = BZip2.compress(data: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class CompDeflate: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = Deflate.compress(data: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class Info7z: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try SevenZipContainer.info(container: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class InfoTar: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try TarContainer.info(container: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class InfoZip: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try ZipContainer.info(container: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class UnBz2: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try BZip2.decompress(data: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class UnGzip: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try GzipArchive.unarchive(archive: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
@@ -33,6 +33,7 @@ class UnXz: Command {
|
||||
var maxTime = Double(Int.min)
|
||||
var minTime = Double(Int.max)
|
||||
|
||||
_ = try XZArchive.unarchive(archive: fileData)
|
||||
for i in 1...10 {
|
||||
print("Iteration \(i): ", terminator: "")
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
Reference in New Issue
Block a user