Skip to content
Snippets Groups Projects
Verified Commit 809a2f03 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

measure times

parent fdacd726
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ use ark_poly::univariate::DensePolynomial;
use ark_poly::DenseUVPolynomial;
use ark_std::ops::Div;
use rs_merkle::Hasher;
use std::time::{Duration, Instant};
use fri::algorithms::Blake3;
use fri_test_utils::Fq;
......@@ -21,13 +22,26 @@ where
for<'a, 'b> &'a P: Div<&'b P, Output = P>,
<H as rs_merkle::Hasher>::Hash: AsRef<[u8]>,
{
eprintln!("evaluation");
let start_time = Instant::now();
let evaluations = komodo::fri::evaluate::<F>(&bytes, k, n);
let shards = komodo::fri::encode::<F>(&bytes, evaluations.clone(), k, n);
eprintln!("{:?}", Instant::now().duration_since(start_time));
eprintln!("encoding");
let evals = evaluations.clone();
let start_time = Instant::now();
let shards = komodo::fri::encode::<F>(&bytes, evals, k, n);
eprintln!("{:?}", Instant::now().duration_since(start_time));
eprintln!("proving");
let start_time = Instant::now();
let blocks = komodo::fri::prove::<N, F, H, P>(evaluations, shards, bf, rpo, q).unwrap();
eprintln!("{:?}", Instant::now().duration_since(start_time));
eprintln!("verifying");
let start_time = Instant::now();
for block in blocks {
komodo::fri::verify::<N, F, H, P>(block, n, q).unwrap();
}
eprintln!("{:?}", Instant::now().duration_since(start_time));
Ok(())
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment