From 639adde48407c80cc5ad1465ac2bcef412b349f7 Mon Sep 17 00:00:00 2001 From: tth Date: Thu, 13 Dec 2018 19:39:06 +0100 Subject: [PATCH] working on fakevalues generator --- exemple.sh | 16 ++++++++++++++-- funcs.c | 11 +++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/exemple.sh b/exemple.sh index 170eb56..60a0d84 100755 --- a/exemple.sh +++ b/exemple.sh @@ -4,7 +4,7 @@ DATAFILE=/tmp/fake-datafile #----- collect the datas > ${DATAFILE} -for s in $(seq 1 20) +for s in $(seq 1 2000) do v=$(./fake-values -s -t 1 2> /dev/null) echo $s $v >> ${DATAFILE} @@ -13,7 +13,19 @@ done #----- do dome useless computations awk ' NR==1 { debut = $2 } - { print $2-debut, $3 } + { + # print $2-debut, $3 + v = int($3/25); + bucket[v]++; + } + END { + for (v=0; v<40; v++) { + for (foo=0; foo +#include #include #include +#include #include #include "funcs.h" extern int verbosity; +/* --------------------------------------------------------------- */ +int seed_my_rand(int foo) +{ +long v1, v2; + +v1 = getpid(); v2 = time(NULL); + +return v1 ^ v2; +} /* --------------------------------------------------------------- */ int random1000(int type)