Skip to content

Commit

Permalink
Fix docs and add report draft
Browse files Browse the repository at this point in the history
  • Loading branch information
aartdem committed May 22, 2024
1 parent 878847f commit 4ace248
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions work1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Стек Трайбера

Все измерения проводились на следующем оборудовании:

* Процессор - 11th Gen Intel® Core™ i5-11500 @ 2.70GHz (6 ядер);
* Оперативная память - 16ГБ;
* Операционная система - Ubuntu 22.04.4 LTS;
* Версия gcc - 11.4.0;
* Версия OpenMP - 4.5.

Каждое измерение проводилось 20 раз, затем для оценки полученных значений времени работы
строился доверительный интервал 95%.

## TODO
6 changes: 4 additions & 2 deletions work1/src/main/kotlin/stack/benchmark/StackBenchmark.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import kotlin.time.measureTime

class StackBenchmark<T>(private val measureScenario: MeasureScenario<T>) {
/**
* Execute loaded scenario [n] times and returns work time in milliseconds. Returns null if scenario was not loaded
* Execute loaded scenario [n] times and returns work time represented as confidence interval
*/
fun startAndMeasure(n: Int): Interval {
val results = List(n) {
Expand Down Expand Up @@ -42,7 +42,9 @@ class StackBenchmark<T>(private val measureScenario: MeasureScenario<T>) {
return calculateConfidenceInterval(results)
}

/** Implemented using [source](https://gist.github.com/gcardone/5536578) */
/**
* Implemented using [source](https://gist.github.com/gcardone/5536578)
* */
private fun calculateConfidenceInterval(results: List<Double>): Interval {
val stats = SummaryStatistics().apply {
results.forEach { this.addValue(it) }
Expand Down

0 comments on commit 4ace248

Please sign in to comment.