Comments (7)
That is very strange, as the test uses a fake clock. Maybe this is not propagated properly across calls :|
from nonius.
Right, figured that out. However, that this failed on Windows specifically means that I can use it to reproduce another bug I've seen before. I'll have a usable Windows machine soon and I'll look into this.
from nonius.
I also reproduced it on Windows running in a VM on Linux if that's any help.
from nonius.
The test still seems to be failing on Windows with changes in ddddadf.
from nonius.
I've done some investigation into this. I think the problem is uninitialized variables on execution_plan. In particular the warmup_time member which is of type std::chrono::nanonseconds. If I print that out before the test runs it's different every time. It seems like there's no sensible default constructor being generated for execution_plan's duration values, if I add one like this:
execution_plan() : iterations_per_sample{}, estimated_duration{}, warmup_time{}, warmup_iterations{} {}
then the test starts passing.
I can understand the int values not being initialized, but the duration values look like they should have a default constructor - although I'm not sure what value the default should be initialized to.
from nonius.
OK, looking at the documentation on MSDN this is expected behaviour - the default constructed value is uninitialized - https://msdn.microsoft.com/en-us/library/hh874737.aspx?f=255&MSPPError=-2147217396
edit: it's strange that this is fine on Linux but not Windows, even when building with mingw64 g++ which has exactly the same chrono header as what I'm using on Linux. I can only assume it's some difference between how executables are linked or run on each platform.
from nonius.
Continuing my novella on this topic; I discovered that these uninitialised variables are reported when I run valgrind ./bin/test
on Linux.
from nonius.
Related Issues (20)
- No mention of "CPU Time"?
- CMake support HOT 1
- Why referencing boost_unit_test_framework library ? HOT 2
- No closing tag for element property in xml-file
- HTTPS Certification of nonius.io is expired HOT 4
- nonius.io website is down
- HTML report shows wrong data with multiple param values
- Struct named concept breaks compilation with c++20 concpets HOT 1
- 2 header locations are needed ? HOT 1
- disable boost
- Broken Link makes it hard to find single-header version
- PSA: nonius.io now contains crypto scammer spam HOT 1
- Automatically determine number of samples given a maximal execution time
- Command line parameter to select which benchmark to run
- example compilation fail with g++ 5 HOT 6
- Site is not working HOT 2
- guide not reachable
- noniuse does not compile with mingw 7.1 and c++17
- Is the library still maintained? HOT 11
- nonius.h++ should include main.h++ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nonius.