Git Product home page Git Product logo

exectime's People

Contributors

rijo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

exectime's Issues

Compilation fails with both g++ 6.2.1 and clang++ 3.8.1

g++:

$make debug
g++ -std=c++14 -Wall -Werror -Wextra -Wpedantic -Wshadow -pthread -g -D=DEBUG src/main.cpp -o exectime
In file included from src/main.cpp:2:0:
src/statistics.hpp: I funktion ”statistics::statistics_t statistics::calculate(const TContainer&, std::function<TValue(const TItem&)>)”:
src/statistics.hpp:34:9: fel: ”vector” är inte en medlem av ”std”
std::vector values;
^~~
src/statistics.hpp:34:27: fel: expected primary-expression before ”>” token
std::vector values;
^
src/statistics.hpp:34:29: fel: ”values” deklarerades inte i detta definitionsområde
std::vector values;
^~~~~~
In file included from src/process.hpp:4:0,
from src/main.cpp:3:
src/pipes.hpp: I global räckvidd:
src/pipes.hpp:68:10: fel: ”vector” i namnrymden ”std” är inte namnet på en malltyp
std::vectorstd::string read_stdin(char delimiter, int timeout = 0) {
^~~~~~
make: *** [Makefile:19: exectime] Fel 1

clang++:

$CXX=clang++ make
clang++ -std=c++14 -Wall -Werror -Wextra -Wpedantic -Wshadow -pthread src/main.cpp -o exectime
In file included from src/main.cpp:2:
src/statistics.hpp:34:14: error: no member named 'vector' in namespace 'std'
std::vector values;
~~~~~^
src/statistics.hpp:34:21: error: 'TValue' does not refer to a value
std::vector values;
^
src/statistics.hpp:25:60: note: declared here
template<typename TContainer, typename TItem, typename TValue>
^
src/statistics.hpp:34:29: error: use of undeclared identifier 'values'
std::vector values;
^
src/statistics.hpp:36:13: error: use of undeclared identifier 'values'
values.push_back(selector(item));
^
src/statistics.hpp:37:19: error: use of undeclared identifier 'values'
std::sort(values.begin(), values.end());
^
src/statistics.hpp:37:35: error: use of undeclared identifier 'values'
std::sort(values.begin(), values.end());
^
src/statistics.hpp:41:25: error: use of undeclared identifier 'values'
s.median = (values[s.sample_size / 2 - 1] + values[s.sample_size / 2]) / 2.0;
^
src/statistics.hpp:41:57: error: use of undeclared identifier 'values'
s.median = (values[s.sample_size / 2 - 1] + values[s.sample_size / 2]) / 2.0;
^
src/statistics.hpp:43:24: error: use of undeclared identifier 'values'
s.median = values[s.sample_size / 2];
^
src/statistics.hpp:45:21: error: use of undeclared identifier 'values'
s.maximum = values.back();
^
src/statistics.hpp:46:21: error: use of undeclared identifier 'values'
s.minimum = values.front();
^
src/statistics.hpp:49:35: error: use of undeclared identifier 'values'; did you mean 'value'?
for (const TValue &value: values)
^~~~~~
value
src/statistics.hpp:49:28: note: 'value' declared here
for (const TValue &value: values)
^
src/statistics.hpp:54:35: error: use of undeclared identifier 'values'; did you mean 'value'?
for (const TValue &value: values) {
^~~~~~
value
src/statistics.hpp:54:28: note: 'value' declared here
for (const TValue &value: values) {
^
In file included from src/main.cpp:3:
In file included from src/process.hpp:4:
src/pipes.hpp:68:10: error: no type named 'vector' in namespace 'std'
std::vectorstd::string read_stdin(char delimiter, int timeout = 0) {
~~~~~^
src/pipes.hpp:68:16: error: expected unqualified-id
std::vectorstd::string read_stdin(char delimiter, int timeout = 0) {
^
In file included from src/main.cpp:2:
src/statistics.hpp:49:33: error: invalid range expression of type 'const unsigned long'; no viable 'begin' function available
for (const TValue &value: values)
^
src/main.cpp:244:61: note: in instantiation of function template specialization 'statistics::calculate<std::vector<std::chrono::duration<long, std::ratio<1, 1000000> >, std::allocator<std::chrono::duration<long, std::ratio<1, 1000000> > >
>, std::chrono::duration<long, std::ratio<1, 1000000> >, unsigned long>' requested here
statistics::statistics_t s = statistics::calculate(execution_times, selector);
^
In file included from src/main.cpp:2:
src/statistics.hpp:54:33: error: invalid range expression of type 'const unsigned long'; no viable 'begin' function available
for (const TValue &value: values) {
^
17 errors generated.
make: *** [Makefile:19: exectime] Fel 1

Ability to define maximum relative standard error target

Today it's only possible to define numer of execution iterations. Normally, if one talks about statistics, the target is to gather data until the relative standard error is below a certain level, say 5%. It would've been nice to define this instead of iteration count.

Side note: if iteration count is given, this should probably be used as maximum (or minimum) iterations before giving up.

Compilation error using g++-7.1.1 (-Werror=implicit-fallthrough=)

`[exectime] ((v0.0.3)) (2) $git rev-parse HEAD
9a96e86
[exectime] ((v0.0.3)) $g++ --version
g++ (GCC) 7.1.1 20170516
Copyright © 2017 Free Software Foundation, Inc.
Detta är fri programvara, se källkoden för kopieringsvillkor. Det
finns INGEN garanti, inte ens för KÖP eller LÄMPLIGHET FÖR NÅGOT
SPECIELLT ÄNDAMÅL.

[exectime] ((v0.0.3)) $make
g++ -std=c++14 -Wall -Werror -Wextra -Wpedantic -Wshadow -pthread src/main.cpp -o exectime
In file included from src/main.cpp:4:0:
src/console.hpp: I funktion ”const std::vectorconsole::arg_t console::parse_args(int, const char**)”:
src/console.hpp:269:39: fel: denna sats kan falla igenom [-Werror=implicit-fallthrough=]
args.emplace_back(arg_t{arg, "", nullptr});
^~~~~~~~~~~~~~~~~~~~~~~
src/console.hpp:270:17: anm: här
case 0:
^~~~
cc1plus: alla varningar behandlas som fel
make: *** [Makefile:19: exectime] Fel 1`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.