chore: folder refactor, start of zio implementation

This commit is contained in:
Abdellah El Morabit 2025-11-26 21:00:00 +01:00
parent fcad65fc51
commit d6f99d058b
5 changed files with 39 additions and 38 deletions

View File

@ -1,9 +1,9 @@
package com.nsrddyn.alu package com.nsrddyn.alu
import com.nsrddyn.alu.Prime
import com.nsrddyn.tools.Benchmark import com.nsrddyn.tools.Benchmark
import com.nsrddyn.test
class Prime() extends Benchmark { class Prime() extends {
/* /*
* Calculate all primes up to limit * Calculate all primes up to limit
@ -40,3 +40,25 @@ class Prime() extends Benchmark {
} }
class PrimeRunner extends Workload {
def run(threads: Int): Unit = {
val pr = new Prime()
val br = new Benchmark()
/*
* test cases
*
* 7919 true
* 2147483647 false
*/
val time = pr.run(7919, true)
println(time)
}
}

View File

@ -1,6 +0,0 @@
package com.nsrddyn.Enums
enum Status:
case PASS
case FAIL

View File

@ -6,6 +6,11 @@ import java.time.Instant
import com.nsrddyn.alu.* import com.nsrddyn.alu.*
import com.nsrddyn.tools.Benchmark import com.nsrddyn.tools.Benchmark
enum Status:
case PASS
case FAIL
object Torque { object Torque {
println("hello world") println("hello world")

View File

@ -1,29 +0,0 @@
package com.nsrddyn.Test
import com.nsrddyn.alu.Prime
import com.nsrddyn.tools.Benchmark
class PrimeTest extends Prime {
def runBasic(): Unit = {
val pr = new Prime()
val br = new Benchmark()
/*
* test cases
*
* 7919 true
* 2147483647 false
*/
val time = pr.run(7919, true)
println(time)
}
def runExtreme(): Unit = println("running some very have stuff!")
}

View File

@ -0,0 +1,9 @@
package com.nsrddyn.Traits
import zio._
trait Workload {
def name: String
def run: ZIO[Any, Nothing, Unit]
}