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

Minor speedup #18

Merged
merged 1 commit into from Dec 25, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Minor speedup

Use recv_bytes/send_bytes instead of recv/send
where possible. This yields a bit less than 10% on
my local benchmark, since the fuzzee and the fuzzers
are saving one call to pickle's serialize/unserialize
per cycle.

I'm sure more performances could be obtained by
changing the remaining recv/send calls,
I might give it a try at some point.
  • Loading branch information
jvoisin committed Dec 24, 2019
commit b91ad83d432f58513299dc061cff7d6392d50047
@@ -19,7 +19,7 @@ def worker(target, child_conn):
cov = coverage.Coverage(branch=True, cover_pylib=True)
cov.start()
while True:
buf = child_conn.recv()
buf = child_conn.recv_bytes()
try:
target(buf)
except Exception as e:
@@ -87,9 +87,10 @@ def start(self):
self._p = mp.Process(target=worker, args=(self._target, child_conn))
self._p.start()


while True:
buf = self._corpus.generate_input()
parent_conn.send(buf)
parent_conn.send_bytes(buf)
if not parent_conn.poll(self._timeout):
self._p.kill()
logging.info("=================================================================")
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.