diff --git a/Makefile b/Makefile index 876955e..b4742c9 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,7 @@ perf: binaries cd tests/performance && python3 connectivity.py test-gen: fftma - cd tests/stages/generation && python3 -m unittest test.py \ No newline at end of file + cd tests/stages/generation && python3 -m unittest test.py + +time-gen: fftma + cd tests/performance/generation && python3 time.py $(N) \ No newline at end of file diff --git a/README.md b/README.md index f19a670..3ae207a 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,32 @@ make binaries make run ``` -## Correr los casos de prueba +## Pruebas de integración ``` make test ``` +## Pruebas unitarias + +### Generacion + +``` +make test-gen +``` + ## Correr las pruebas de performance ``` make perf ``` +### Obtener tiempos de generacion + +``` +make time-gen N= +``` + ## Instalar el binario FFTMA ``` diff --git a/tests/performance/generation/time.py b/tests/performance/generation/time.py index 7b13400..9721e32 100644 --- a/tests/performance/generation/time.py +++ b/tests/performance/generation/time.py @@ -42,15 +42,15 @@ SAMPLE_SIZE=1000 def time_measurement(n, sample_size): sample = [] + print(f"SAMPLE_SIZE = {SAMPLE_SIZE}") for i in range(sample_size): _, duration = generate(n) print(i) sample.append(duration) - print("sali") npsample = np.array(sample) - print(np.mean(npsample)) - print(np.median(npsample)) + print(f"AVG: {np.mean(npsample)} seconds") + print(f"MEDIAN: {np.median(npsample)} seconds") time_measurement(N, SAMPLE_SIZE) \ No newline at end of file