Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(small error) wrong time measurement? #3

Closed
weikengchen opened this issue Mar 21, 2018 · 1 comment
Closed

(small error) wrong time measurement? #3

weikengchen opened this issue Mar 21, 2018 · 1 comment

Comments

@weikengchen
Copy link
Contributor

In FlexSC/test/oram/TestCircuitOramRec.java, after each write,

Flag.sw.startTotal();
client.write(client.baseOram.lib.toSignals(element), scData);
double t = Flag.sw.stopTotal();
Flag.sw.addCounter();

We increase the counter.

In FlexSC/src/util/StopWatch.java, the default value of the counter is:

long counter = 1;

flush() also makes it back to 1.

However, to print the result:

System.out.println(elapsedTimeTotal / 1000000000.0 / counter + "\t"

So, if we do experiments for 128 writes, the result is the total divided by 129.

I am doing experiments for 10 writes (for very big input), the result is divided by 11 (kind of problematic).

It seems that Flag StopWatch with a counter is only used to measure the Circuit ORAM.
So I think I can submit a PR to reduce 1 counter increasement.

This also affects the ObliVMGC library because the code is the same. (maybe no need to fix that one)
https://github.com/oblivm/ObliVMGC/tree/master/java/com/oblivm/backend

@weikengchen
Copy link
Contributor Author

It has been merged. Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant