Skip to content

Commit aec9d00

Browse files
[4.x] Add ResultData and MetricData DTO classes
1 parent 09e88e4 commit aec9d00

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

src/Data/MetricData.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DragonCode\Benchmark\Data;
6+
7+
readonly class MetricData
8+
{
9+
public function __construct(
10+
public float $time,
11+
public float $memory,
12+
) {}
13+
}

src/Data/ResultData.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DragonCode\Benchmark\Data;
6+
7+
readonly class ResultData
8+
{
9+
public function __construct(
10+
public MetricData $min,
11+
public MetricData $max,
12+
public MetricData $avg,
13+
public MetricData $total,
14+
) {}
15+
}

0 commit comments

Comments
 (0)