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

How to disable assert when run unit test #40

Closed
GoogleCodeExporter opened this issue Apr 11, 2015 · 3 comments
Closed

How to disable assert when run unit test #40

GoogleCodeExporter opened this issue Apr 11, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run snappy-unittest

What is the expected output? What do you see instead?
  How to disable assert, so there is no warning when I run 
  snappy-unittest. 

What version of the product are you using? On what operating system?
    snappy-1.0.1

Please provide any additional information below.


./snappy_unittest --run_microbenchmarks=false

Running microbenchmarks.
WARNING: Compiled with assertions enabled, will be slow.

Original issue reported on code.google.com by fengdon...@gmail.com on 7 May 2011 at 1:09

@GoogleCodeExporter
Copy link
Author

This has got nothing to do with the unit test; it's just warning you that 
you've compiled with suboptimal flags for speed. If you want to compile without 
assertions, defining NDEBUG is the standard way, e.g. CFLAGS="-O2 -DNDEBUG" 
CXXFLAGS="-O2 -DNDEBUG" ./configure. (This is not Snappy-specific; the same 
holds for assert() from the standard C library.)

Original comment by se...@google.com on 7 May 2011 at 2:37

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Thanks for quickly response.

warning disappered. but I've another issue:

I test snappy-1.0.1 and lzo2.04 to compare with this result:
http://www.spinics.net/lists/linux-driver-devel/msg14417.html

but I got a very different result:
origin data total size: 1692240669 (1.7GB text)

snappy compressed time total:7441 ms
snappy decompressed time total:1620 ms
lzo compressed time total:8544 ms
lzo decompressed time total:4607 ms

I used snappy-java, also call lzo in Java.

Original comment by fengdon...@gmail.com on 7 May 2011 at 2:58

@GoogleCodeExporter
Copy link
Author

UPDATED:
I changed compile options(provided in your answer)
Got a new result:

snappy compressed time total:3878ms
snappy decompressed time total:1589ms
lzo compressed time total:8471ms
lzo decompressed time total:4575ms

does that ok as snappy test result.

Original comment by fengdon...@gmail.com on 7 May 2011 at 3:02

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

No branches or pull requests

1 participant