gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: fix stats sample data generator


From: gnunet
Subject: [libeufin] branch master updated: fix stats sample data generator
Date: Fri, 24 Nov 2023 22:07:10 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new fec2ef05 fix stats sample data generator
fec2ef05 is described below

commit fec2ef057222d3f2a9c2784c8d45a42a48ad6fb0
Author: MS <ms@taler.net>
AuthorDate: Fri Nov 24 22:05:59 2023 +0100

    fix stats sample data generator
---
 contrib/populate-stats.sh | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/contrib/populate-stats.sh b/contrib/populate-stats.sh
index 0ad510f9..63a31d3f 100755
--- a/contrib/populate-stats.sh
+++ b/contrib/populate-stats.sh
@@ -26,12 +26,30 @@ rnd () {
 insert_stat () {
   echo "
     SET search_path TO libeufin_bank;
+    CALL libeufin_bank.stats_register_payment (
+      'taler_in'::text
+      ,TO_TIMESTAMP($1)::timestamp
+      ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
+      ,null
+    );
     CALL libeufin_bank.stats_register_payment (
       'taler_out'::text
       ,TO_TIMESTAMP($1)::timestamp
       ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
+      ,null
+    );
+    CALL libeufin_bank.stats_register_payment (
+      'cashin'::text
+      ,TO_TIMESTAMP($1)::timestamp
+      ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
       ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
-      );"
+    );
+    CALL libeufin_bank.stats_register_payment (
+      'cashout'::text
+      ,TO_TIMESTAMP($1)::timestamp
+      ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
+      ,($(rnd 0 99999999), $(rnd 0 99999999))::taler_amount
+    );"
 }
 
 # $1 == timestamp
@@ -66,8 +84,7 @@ insert_cmd () {
     );"
 }
  
-for n_hour_ago in `seq 1 5`; do
-# for n_hour_ago in `seq 1 100`; do
+for n_hour_ago in `seq 1 100`; do
   echo -n .
   TIMESTAMP=$(date --date="${n_hour_ago} hour ago" +%s)
   # psql $DB_NAME -c "$(insert_cmd ${TIMESTAMP})" > /dev/null

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]