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

Avoid marshalling every packet to a string when not in debug mode #26

Closed
wants to merge 1 commit into from

Commits on Nov 19, 2015

  1. Avoid marshalling every packet to a string when not in debug mode

    The `Log.debug` function will create a string to be logged via
    
    ```
    Fmt.kstrf (fun s -> if !print_debug then print_endline s) fmt
    ```
    
    before deciding whether to print them or not. In debug mode we print every
    packet received and transmitted. This patch ensures that, when not in
    debug mode, we don't generate vast quantities of strings which we never
    print.
    
    Signed-off-by: David Scott <dave.scott@unikernel.com>
    djs55 committed Nov 19, 2015
    Configuration menu
    Copy the full SHA
    40160c1 View commit details
    Browse the repository at this point in the history