From 88b8be9f6abccaf2e432debdcbb6ced5795d8b84 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 14 Jan 2025 13:02:32 +0100 Subject: [PATCH] use us instead of ms, optimized html template --- README.md | 11 + report_template.html | 1290 ++++++++++++++++++++++++++++++++---------- tool.go | 30 +- 3 files changed, 1016 insertions(+), 315 deletions(-) diff --git a/README.md b/README.md index b8c9b50..8cad112 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,17 @@ If you don't trust the pre-compiled binaries, feel free to directly use the `Usa go run tool.go --run +# CSV Format +The result CSV contains `type;time_microseconds;value;timestamp`. +- type: Type of test +- time_microseconds: The time used for actually executing the only test-revelant part, excluding time to setup the test before it can run (file creation, logging, etc...) +- value: The value for values other than time_, for example the CPU cycles +- timestamp: The timestamp of when the actual CSV row has been written + + +# HTML Format +The result HTML contains an easy viewable page with charts to make it easier for humans to read. + ## Development Always create an `issue` at github before you start changing things that you want to be merged into this repository. diff --git a/report_template.html b/report_template.html index 0326c1a..7affe10 100644 --- a/report_template.html +++ b/report_template.html @@ -1,5 +1,6 @@ + Nullix Server Hardware Performance Test Tool (NSHPTT) Report @@ -21,338 +22,1027 @@ padding: 10px; text-align: left; } + .area { padding: 10px 20px; border-left: 5px solid #ccc; margin-bottom: 20px; } - h2, h3 { + + h2, + h3 { padding: 8px 0; margin: 0 0 8px; border-bottom: 1px solid #ccc; } - .ct-label {fill: rgba(0, 0, 0, .4);color: rgba(0, 0, 0, .4);font-size: .75rem;line-height: 1} - .ct-chart-bar .ct-label, .ct-chart-line .ct-label {display: flex} - .ct-chart-donut .ct-label, .ct-chart-pie .ct-label {dominant-baseline: central} - .ct-label.ct-horizontal.ct-start {align-items: flex-end;justify-content: flex-start;text-align: left} - .ct-label.ct-horizontal.ct-end {align-items: flex-start;justify-content: flex-start;text-align: left} - .ct-label.ct-vertical.ct-start {align-items: flex-end;justify-content: flex-end;text-align: right} - .ct-label.ct-vertical.ct-end {align-items: flex-end;justify-content: flex-start;text-align: left} - .ct-chart-bar .ct-label.ct-horizontal.ct-start {align-items: flex-end;justify-content: center;text-align: center} - .ct-chart-bar .ct-label.ct-horizontal.ct-end {align-items: flex-start;justify-content: center;text-align: center} - .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start {align-items: flex-end;justify-content: flex-start;text-align: left} - .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end {align-items: flex-start;justify-content: flex-start;text-align: left} - .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start {align-items: center;justify-content: flex-end;text-align: right} - .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end {align-items: center;justify-content: flex-start;text-align: left} - .ct-grid {stroke: rgba(0, 0, 0, .2);stroke-width: 1px;stroke-dasharray: 2px} - .ct-grid-background {fill: none} - .ct-point {stroke-width: 10px;stroke-linecap: round; display: none} - .ct-line {fill: none;stroke-width: 4px} - .ct-area {stroke: none;fill-opacity: .1} - .ct-bar {fill: none;stroke-width: 10px} - .ct-slice-donut {fill: none;stroke-width: 60px} - .ct-series-a .ct-bar, .ct-series-a .ct-line, .ct-series-a .ct-point, .ct-series-a .ct-slice-donut {stroke: #d70206} - .ct-series-a .ct-area, .ct-series-a .ct-slice-pie {fill: #d70206} - .ct-series-b .ct-bar, .ct-series-b .ct-line, .ct-series-b .ct-point, .ct-series-b .ct-slice-donut {stroke: #f05b4f} - .ct-series-b .ct-area, .ct-series-b .ct-slice-pie {fill: #f05b4f} - .ct-series-c .ct-bar, .ct-series-c .ct-line, .ct-series-c .ct-point, .ct-series-c .ct-slice-donut {stroke: #f4c63d} - .ct-series-c .ct-area, .ct-series-c .ct-slice-pie {fill: #f4c63d} - .ct-series-d .ct-bar, .ct-series-d .ct-line, .ct-series-d .ct-point, .ct-series-d .ct-slice-donut {stroke: #d17905} - .ct-series-d .ct-area, .ct-series-d .ct-slice-pie {fill: #d17905} - .ct-series-e .ct-bar, .ct-series-e .ct-line, .ct-series-e .ct-point, .ct-series-e .ct-slice-donut {stroke: #453d3f} - .ct-series-e .ct-area, .ct-series-e .ct-slice-pie {fill: #453d3f} - .ct-series-f .ct-bar, .ct-series-f .ct-line, .ct-series-f .ct-point, .ct-series-f .ct-slice-donut {stroke: #59922b} - .ct-series-f .ct-area, .ct-series-f .ct-slice-pie {fill: #59922b} - .ct-series-g .ct-bar, .ct-series-g .ct-line, .ct-series-g .ct-point, .ct-series-g .ct-slice-donut {stroke: #0544d3} - .ct-series-g .ct-area, .ct-series-g .ct-slice-pie {fill: #0544d3} - .ct-series-h .ct-bar, .ct-series-h .ct-line, .ct-series-h .ct-point, .ct-series-h .ct-slice-donut {stroke: #6b0392} - .ct-series-h .ct-area, .ct-series-h .ct-slice-pie {fill: #6b0392} - .ct-series-i .ct-bar, .ct-series-i .ct-line, .ct-series-i .ct-point, .ct-series-i .ct-slice-donut {stroke: #e6805e} - .ct-series-i .ct-area, .ct-series-i .ct-slice-pie {fill: #e6805e} - .ct-series-j .ct-bar, .ct-series-j .ct-line, .ct-series-j .ct-point, .ct-series-j .ct-slice-donut {stroke: #dda458} - .ct-series-j .ct-area, .ct-series-j .ct-slice-pie {fill: #dda458} - .ct-series-k .ct-bar, .ct-series-k .ct-line, .ct-series-k .ct-point, .ct-series-k .ct-slice-donut {stroke: #eacf7d} - .ct-series-k .ct-area, .ct-series-k .ct-slice-pie {fill: #eacf7d} - .ct-series-l .ct-bar, .ct-series-l .ct-line, .ct-series-l .ct-point, .ct-series-l .ct-slice-donut {stroke: #86797d} - .ct-series-l .ct-area, .ct-series-l .ct-slice-pie {fill: #86797d} - .ct-series-m .ct-bar, .ct-series-m .ct-line, .ct-series-m .ct-point, .ct-series-m .ct-slice-donut {stroke: #b2c326} - .ct-series-m .ct-area, .ct-series-m .ct-slice-pie {fill: #b2c326} - .ct-series-n .ct-bar, .ct-series-n .ct-line, .ct-series-n .ct-point, .ct-series-n .ct-slice-donut {stroke: #6188e2} - .ct-series-n .ct-area, .ct-series-n .ct-slice-pie {fill: #6188e2} - .ct-series-o .ct-bar, .ct-series-o .ct-line, .ct-series-o .ct-point, .ct-series-o .ct-slice-donut {stroke: #a748ca} - .ct-series-o .ct-area, .ct-series-o .ct-slice-pie {fill: #a748ca} - .ct-square {display: block;position: relative;width: 100%} - .ct-square:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 100%} - .ct-square:after {content: "";display: table;clear: both} - .ct-square > svg {display: block;position: absolute;top: 0;left: 0} - .ct-minor-second {display: block;position: relative;width: 100%} - .ct-minor-second:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 93.75%} - .ct-minor-second:after {content: "";display: table;clear: both} - .ct-minor-second > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-second {display: block;position: relative;width: 100%} - .ct-major-second:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 88.8888888889%} - .ct-major-second:after {content: "";display: table;clear: both} - .ct-major-second > svg {display: block;position: absolute;top: 0;left: 0} - .ct-minor-third {display: block;position: relative;width: 100%} - .ct-minor-third:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 83.3333333333%} - .ct-minor-third:after {content: "";display: table;clear: both} - .ct-minor-third > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-third {display: block;position: relative;width: 100%} - .ct-major-third:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 80%} - .ct-major-third:after {content: "";display: table;clear: both} - .ct-major-third > svg {display: block;position: absolute;top: 0;left: 0} - .ct-perfect-fourth {display: block;position: relative;width: 100%} - .ct-perfect-fourth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 75%} - .ct-perfect-fourth:after {content: "";display: table;clear: both} - .ct-perfect-fourth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-perfect-fifth {display: block;position: relative;width: 100%} - .ct-perfect-fifth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 66.6666666667%} - .ct-perfect-fifth:after {content: "";display: table;clear: both} - .ct-perfect-fifth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-minor-sixth {display: block;position: relative;width: 100%} - .ct-minor-sixth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 62.5%} - .ct-minor-sixth:after {content: "";display: table;clear: both} - .ct-minor-sixth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-golden-section {display: block;position: relative;width: 100%} - .ct-golden-section:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 61.804697157%} - .ct-golden-section:after {content: "";display: table;clear: both} - .ct-golden-section > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-sixth {display: block;position: relative;width: 100%} - .ct-major-sixth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 60%} - .ct-major-sixth:after {content: "";display: table;clear: both} - .ct-major-sixth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-minor-seventh {display: block;position: relative;width: 100%} - .ct-minor-seventh:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 56.25%} - .ct-minor-seventh:after {content: "";display: table;clear: both} - .ct-minor-seventh > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-seventh {display: block;position: relative;width: 100%} - .ct-major-seventh:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 53.3333333333%} - .ct-major-seventh:after {content: "";display: table;clear: both} - .ct-major-seventh > svg {display: block;position: absolute;top: 0;left: 0} - .ct-octave {display: block;position: relative;width: 100%} - .ct-octave:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 50%} - .ct-octave:after {content: "";display: table;clear: both} - .ct-octave > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-tenth {display: block;position: relative;width: 100%} - .ct-major-tenth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 40%} - .ct-major-tenth:after {content: "";display: table;clear: both} - .ct-major-tenth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-eleventh {display: block;position: relative;width: 100%} - .ct-major-eleventh:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 37.5%} - .ct-major-eleventh:after {content: "";display: table;clear: both} - .ct-major-eleventh > svg {display: block;position: absolute;top: 0;left: 0} - .ct-major-twelfth {display: block;position: relative;width: 100%} - .ct-major-twelfth:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 33.3333333333%} - .ct-major-twelfth:after {content: "";display: table;clear: both} - .ct-major-twelfth > svg {display: block;position: absolute;top: 0;left: 0} - .ct-double-octave {display: block;position: relative;width: 100%} - .ct-double-octave:before {display: block;float: left;content: "";width: 0;height: 0;padding-bottom: 25%} - .ct-double-octave:after {content: "";display: table;clear: both} - .ct-double-octave > svg {display: block;position: absolute;top: 0;left: 0} + + .ct-label { + fill: rgba(0, 0, 0, .4); + color: rgba(0, 0, 0, .4); + font-size: .75rem; + line-height: 1 + } + + .ct-chart-bar .ct-label, + .ct-chart-line .ct-label { + display: flex + } + + .ct-chart-donut .ct-label, + .ct-chart-pie .ct-label { + dominant-baseline: central + } + + .ct-label.ct-horizontal.ct-start { + align-items: flex-end; + justify-content: flex-start; + text-align: left + } + + .ct-label.ct-horizontal.ct-end { + align-items: flex-start; + justify-content: flex-start; + text-align: left + } + + .ct-label.ct-vertical.ct-start { + align-items: flex-end; + justify-content: flex-end; + text-align: right + } + + .ct-label.ct-vertical.ct-end { + align-items: flex-end; + justify-content: flex-start; + text-align: left + } + + .ct-chart-bar .ct-label.ct-horizontal.ct-start { + align-items: flex-end; + justify-content: center; + text-align: center + } + + .ct-chart-bar .ct-label.ct-horizontal.ct-end { + align-items: flex-start; + justify-content: center; + text-align: center + } + + .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start { + align-items: flex-end; + justify-content: flex-start; + text-align: left + } + + .ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end { + align-items: flex-start; + justify-content: flex-start; + text-align: left + } + + .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start { + align-items: center; + justify-content: flex-end; + text-align: right + } + + .ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end { + align-items: center; + justify-content: flex-start; + text-align: left + } + + .ct-grid { + stroke: rgba(0, 0, 0, .2); + stroke-width: 1px; + stroke-dasharray: 2px + } + + .ct-grid-background { + fill: none + } + + .ct-point { + stroke-width: 10px; + stroke-linecap: round; + display: none + } + + .ct-line { + fill: none; + stroke-width: 4px + } + + .ct-area { + stroke: none; + fill-opacity: .1 + } + + .ct-bar { + fill: none; + stroke-width: 10px + } + + .ct-slice-donut { + fill: none; + stroke-width: 60px + } + + .ct-series-a .ct-bar, + .ct-series-a .ct-line, + .ct-series-a .ct-point, + .ct-series-a .ct-slice-donut { + stroke: #d70206 + } + + .ct-series-a .ct-area, + .ct-series-a .ct-slice-pie { + fill: #d70206 + } + + .ct-series-b .ct-bar, + .ct-series-b .ct-line, + .ct-series-b .ct-point, + .ct-series-b .ct-slice-donut { + stroke: #f05b4f + } + + .ct-series-b .ct-area, + .ct-series-b .ct-slice-pie { + fill: #f05b4f + } + + .ct-series-c .ct-bar, + .ct-series-c .ct-line, + .ct-series-c .ct-point, + .ct-series-c .ct-slice-donut { + stroke: #f4c63d + } + + .ct-series-c .ct-area, + .ct-series-c .ct-slice-pie { + fill: #f4c63d + } + + .ct-series-d .ct-bar, + .ct-series-d .ct-line, + .ct-series-d .ct-point, + .ct-series-d .ct-slice-donut { + stroke: #d17905 + } + + .ct-series-d .ct-area, + .ct-series-d .ct-slice-pie { + fill: #d17905 + } + + .ct-series-e .ct-bar, + .ct-series-e .ct-line, + .ct-series-e .ct-point, + .ct-series-e .ct-slice-donut { + stroke: #453d3f + } + + .ct-series-e .ct-area, + .ct-series-e .ct-slice-pie { + fill: #453d3f + } + + .ct-series-f .ct-bar, + .ct-series-f .ct-line, + .ct-series-f .ct-point, + .ct-series-f .ct-slice-donut { + stroke: #59922b + } + + .ct-series-f .ct-area, + .ct-series-f .ct-slice-pie { + fill: #59922b + } + + .ct-series-g .ct-bar, + .ct-series-g .ct-line, + .ct-series-g .ct-point, + .ct-series-g .ct-slice-donut { + stroke: #0544d3 + } + + .ct-series-g .ct-area, + .ct-series-g .ct-slice-pie { + fill: #0544d3 + } + + .ct-series-h .ct-bar, + .ct-series-h .ct-line, + .ct-series-h .ct-point, + .ct-series-h .ct-slice-donut { + stroke: #6b0392 + } + + .ct-series-h .ct-area, + .ct-series-h .ct-slice-pie { + fill: #6b0392 + } + + .ct-series-i .ct-bar, + .ct-series-i .ct-line, + .ct-series-i .ct-point, + .ct-series-i .ct-slice-donut { + stroke: #e6805e + } + + .ct-series-i .ct-area, + .ct-series-i .ct-slice-pie { + fill: #e6805e + } + + .ct-series-j .ct-bar, + .ct-series-j .ct-line, + .ct-series-j .ct-point, + .ct-series-j .ct-slice-donut { + stroke: #dda458 + } + + .ct-series-j .ct-area, + .ct-series-j .ct-slice-pie { + fill: #dda458 + } + + .ct-series-k .ct-bar, + .ct-series-k .ct-line, + .ct-series-k .ct-point, + .ct-series-k .ct-slice-donut { + stroke: #eacf7d + } + + .ct-series-k .ct-area, + .ct-series-k .ct-slice-pie { + fill: #eacf7d + } + + .ct-series-l .ct-bar, + .ct-series-l .ct-line, + .ct-series-l .ct-point, + .ct-series-l .ct-slice-donut { + stroke: #86797d + } + + .ct-series-l .ct-area, + .ct-series-l .ct-slice-pie { + fill: #86797d + } + + .ct-series-m .ct-bar, + .ct-series-m .ct-line, + .ct-series-m .ct-point, + .ct-series-m .ct-slice-donut { + stroke: #b2c326 + } + + .ct-series-m .ct-area, + .ct-series-m .ct-slice-pie { + fill: #b2c326 + } + + .ct-series-n .ct-bar, + .ct-series-n .ct-line, + .ct-series-n .ct-point, + .ct-series-n .ct-slice-donut { + stroke: #6188e2 + } + + .ct-series-n .ct-area, + .ct-series-n .ct-slice-pie { + fill: #6188e2 + } + + .ct-series-o .ct-bar, + .ct-series-o .ct-line, + .ct-series-o .ct-point, + .ct-series-o .ct-slice-donut { + stroke: #a748ca + } + + .ct-series-o .ct-area, + .ct-series-o .ct-slice-pie { + fill: #a748ca + } + + .ct-square { + display: block; + position: relative; + width: 100% + } + + .ct-square:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 100% + } + + .ct-square:after { + content: ""; + display: table; + clear: both + } + + .ct-square>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-minor-second { + display: block; + position: relative; + width: 100% + } + + .ct-minor-second:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 93.75% + } + + .ct-minor-second:after { + content: ""; + display: table; + clear: both + } + + .ct-minor-second>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-second { + display: block; + position: relative; + width: 100% + } + + .ct-major-second:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 88.8888888889% + } + + .ct-major-second:after { + content: ""; + display: table; + clear: both + } + + .ct-major-second>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-minor-third { + display: block; + position: relative; + width: 100% + } + + .ct-minor-third:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 83.3333333333% + } + + .ct-minor-third:after { + content: ""; + display: table; + clear: both + } + + .ct-minor-third>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-third { + display: block; + position: relative; + width: 100% + } + + .ct-major-third:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 80% + } + + .ct-major-third:after { + content: ""; + display: table; + clear: both + } + + .ct-major-third>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-perfect-fourth { + display: block; + position: relative; + width: 100% + } + + .ct-perfect-fourth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 75% + } + + .ct-perfect-fourth:after { + content: ""; + display: table; + clear: both + } + + .ct-perfect-fourth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-perfect-fifth { + display: block; + position: relative; + width: 100% + } + + .ct-perfect-fifth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 66.6666666667% + } + + .ct-perfect-fifth:after { + content: ""; + display: table; + clear: both + } + + .ct-perfect-fifth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-minor-sixth { + display: block; + position: relative; + width: 100% + } + + .ct-minor-sixth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 62.5% + } + + .ct-minor-sixth:after { + content: ""; + display: table; + clear: both + } + + .ct-minor-sixth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-golden-section { + display: block; + position: relative; + width: 100% + } + + .ct-golden-section:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 61.804697157% + } + + .ct-golden-section:after { + content: ""; + display: table; + clear: both + } + + .ct-golden-section>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-sixth { + display: block; + position: relative; + width: 100% + } + + .ct-major-sixth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 60% + } + + .ct-major-sixth:after { + content: ""; + display: table; + clear: both + } + + .ct-major-sixth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-minor-seventh { + display: block; + position: relative; + width: 100% + } + + .ct-minor-seventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 56.25% + } + + .ct-minor-seventh:after { + content: ""; + display: table; + clear: both + } + + .ct-minor-seventh>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-seventh { + display: block; + position: relative; + width: 100% + } + + .ct-major-seventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 53.3333333333% + } + + .ct-major-seventh:after { + content: ""; + display: table; + clear: both + } + + .ct-major-seventh>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-octave { + display: block; + position: relative; + width: 100% + } + + .ct-octave:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 50% + } + + .ct-octave:after { + content: ""; + display: table; + clear: both + } + + .ct-octave>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-tenth { + display: block; + position: relative; + width: 100% + } + + .ct-major-tenth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 40% + } + + .ct-major-tenth:after { + content: ""; + display: table; + clear: both + } + + .ct-major-tenth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-eleventh { + display: block; + position: relative; + width: 100% + } + + .ct-major-eleventh:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 37.5% + } + + .ct-major-eleventh:after { + content: ""; + display: table; + clear: both + } + + .ct-major-eleventh>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-major-twelfth { + display: block; + position: relative; + width: 100% + } + + .ct-major-twelfth:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 33.3333333333% + } + + .ct-major-twelfth:after { + content: ""; + display: table; + clear: both + } + + .ct-major-twelfth>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + .ct-double-octave { + display: block; + position: relative; + width: 100% + } + + .ct-double-octave:before { + display: block; + float: left; + content: ""; + width: 0; + height: 0; + padding-bottom: 25% + } + + .ct-double-octave:after { + content: ""; + display: table; + clear: both + } + + .ct-double-octave>svg { + display: block; + position: absolute; + top: 0; + left: 0 + } + + -
-

Nullix Server Hardware Performance Test Tool (NSHPTT) Report

-
Test started at
-
Executable:
-
Test-Config -

-
-

CPU Cycles Test

- Runtime:
- Total Cycles done: +
+

Nullix Server Hardware Performance Test Tool (NSHPTT) Report

+
Test started:
+
Executable:
+
Test-Config +

+
+

CPU Cycles Test

+ Runtime:
+ Total Cycles done: +
+
-
-
- + styleEl.innerHTML = styleHtml + new window.Chartist.BarChart( + areaEl.querySelector('.charts-all'), + { + series: allSeries, + }, + { + stackBars: true, + axisX: { + type: window.Chartist.AutoScaleAxis, + onlyInteger: true, + labelInterpolationFnc: (value, index) => { + return (index % 2 === 0 ? row.axisXLabelPrefix + value : null) + } + }, + axisY: { + labelOffset: { x: 20, y: 0 }, + labelInterpolationFnc: (value, index) => { + return getLabelForRuntime(value) + } + }, + low: 0, + }, + ) + } + } + } + })() + + \ No newline at end of file diff --git a/tool.go b/tool.go index 9fce522..99a6b66 100644 --- a/tool.go +++ b/tool.go @@ -96,7 +96,7 @@ func main() { resultsCsvPath := testFolder + "/results/" + (time.Now().Format("2006-01-02T15-04-05")) + ".csv" resultsHtmlPath := testFolder + "/results/" + (time.Now().Format("2006-01-02T15-04-05")) + ".html" - resultsCsv := "type;time_ms;value;timestamp\n" + resultsCsv := "type;time_microseconds;value;timestamp\n" if mode == "help" { fmt.Println("===Nullix Server Hardware Performance Test Tool v" + version + " (NSHPTT)===") @@ -181,7 +181,7 @@ func main() { logPrint("Ended") logPrintf("%d cycles done\n", results.CpuCycles) logPrintf("%dms total runtime\n", int(time.Since(start).Milliseconds())) - resultsCsv += fmt.Sprintf("CPU Test Cycles;%d;%d;%s\n", elapsed, results.CpuCycles, (time.Now().Format(time.RFC3339))) + resultsCsv += fmt.Sprintf("CPU Test Cycles;%d;%d;%s\n", elapsed, results.CpuCycles, (time.Now().Format(time.RFC3339Nano))) } if config.DiskTestWrdFiles > 0 { @@ -203,8 +203,8 @@ func main() { crand.Read(data) start := time.Now() os.WriteFile(path, data, 0777) - elapsed := int(time.Since(start).Milliseconds()) - resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Write;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339))) + elapsed := int(time.Since(start).Microseconds()) + resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Write;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339Nano))) results.WrdWriteDataPoints = append(results.WrdWriteDataPoints, elapsed) results.WrdWriteTotal += elapsed if elapsed > results.WrdWriteMax { @@ -215,7 +215,7 @@ func main() { } } results.WrdWriteAvg = results.WrdWriteTotal / config.DiskTestWrdFiles - logPrintf("Writes done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdWriteTotal, results.WrdWriteMin, results.WrdWriteMax, results.WrdWriteAvg) + logPrintf("Writes done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdWriteTotal/1000, results.WrdWriteMin/1000, results.WrdWriteMax/1000, results.WrdWriteAvg/1000) // read all files totalCount = 0 for { @@ -233,8 +233,8 @@ func main() { if len(bytes) != config.DiskTestWrdFileSize { panic("Testfile has " + strconv.Itoa(len(bytes)) + "bytes but expected " + strconv.Itoa(config.DiskTestWrdFileSize)) } - elapsed := int(time.Since(start).Milliseconds()) - resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Read;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339))) + elapsed := int(time.Since(start).Microseconds()) + resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Read;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339Nano))) results.WrdReadDataPoints = append(results.WrdReadDataPoints, elapsed) results.WrdReadTotal += elapsed if elapsed > results.WrdReadMax { @@ -245,7 +245,7 @@ func main() { } } results.WrdReadAvg = results.WrdReadTotal / config.DiskTestWrdFiles - logPrintf("Read done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdReadTotal, results.WrdReadMin, results.WrdReadMax, results.WrdReadAvg) + logPrintf("Read done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdReadTotal/1000, results.WrdReadMin/1000, results.WrdReadMax/1000, results.WrdReadAvg/1000) // delete all files totalCount = 0 for { @@ -259,8 +259,8 @@ func main() { } start := time.Now() err := os.Remove(path) - elapsed := int(time.Since(start).Milliseconds()) - resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Delete;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339))) + elapsed := int(time.Since(start).Microseconds()) + resultsCsv += fmt.Sprintf("Disk WRD Test #%d, Delete;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339Nano))) results.WrdDeleteDataPoints = append(results.WrdDeleteDataPoints, elapsed) errorCheck(err) results.WrdDeleteTotal += elapsed @@ -272,10 +272,10 @@ func main() { } } results.WrdDeleteAvg = results.WrdDeleteTotal / config.DiskTestWrdFiles - logPrintf("Delete done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdDeleteTotal, results.WrdDeleteMin, results.WrdDeleteMax, results.WrdDeleteAvg) + logPrintf("Delete done in %dms, min: %dms, max: %dms, average: %dms\n", results.WrdDeleteTotal/1000, results.WrdDeleteMin/1000, results.WrdDeleteMax/1000, results.WrdDeleteAvg/1000) logPrint("Ended") - logPrintf("%dms total runtime\n", results.WrdWriteTotal+results.WrdReadTotal+results.WrdDeleteTotal) + logPrintf("%dms total runtime\n", (results.WrdWriteTotal+results.WrdReadTotal+results.WrdDeleteTotal)/1000) } if config.DiskTestRoFiles > 0 { logLinePrefix = "Disk Read-Only Test: " @@ -297,7 +297,7 @@ func main() { if len(bytes) != config.DiskTestRoFileSize { panic("Testfile has " + strconv.Itoa(len(bytes)) + "bytes but expected " + strconv.Itoa(config.DiskTestWrdFileSize)) } - elapsed := int(time.Since(start).Milliseconds()) + elapsed := int(time.Since(start).Microseconds()) resultsCsv += fmt.Sprintf("Disk Read-Only #%d;%d;;%s\n", totalCount, elapsed, (time.Now().Format(time.RFC3339))) results.RoReadDataPoints = append(results.RoReadDataPoints, elapsed) results.RoReadTotal += elapsed @@ -309,9 +309,9 @@ func main() { } } results.RoReadAvg = results.RoReadTotal / config.DiskTestRoFiles - logPrintf("Read done in %dms, min: %dms, max: %dms, average: %dms\n", results.RoReadTotal, results.RoReadMin, results.RoReadMax, results.RoReadAvg) + logPrintf("Read done in %dms, min: %dms, max: %dms, average: %dms\n", results.RoReadTotal/1000, results.RoReadMin/1000, results.RoReadMax/1000, results.RoReadAvg/1000) logPrint("Ended") - logPrintf("%dms total runtime\n", results.RoReadTotal) + logPrintf("%dms total runtime\n", results.RoReadTotal/1000) } os.WriteFile(resultsCsvPath, []byte(resultsCsv), 0777) resultsJsonStr, err := json.Marshal(results)