Megatest

Check-in [6e2f351dc9]
Login
Overview
Comment:Tweaked debug.scm
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v2.0001
Files: files | file ages | folders
SHA1: 6e2f351dc9eb700214b86d42bfbd2b48c6cced1d
User & Date: matt on 2022-01-06 08:10:53
Other Links: branch diff | manifest | tags
Context
2022-01-06
08:36
Added simple ulex (used as a sanity checker check-in: acda13e7e1 user: matt tags: v2.0001
08:10
Tweaked debug.scm check-in: 6e2f351dc9 user: matt tags: v2.0001
2022-01-05
20:59
wip check-in: 94e8e9f0b5 user: matt tags: v2.0001
Changes

Modified tests/simplerun/debug.scm from [55a7eef5b7] to [95b92a9335].

1
2
3
4
5
6
7
8
9
10
11











12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28























29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

















23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47











+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


(import big-chicken trace rmtmod apimod dbmod ulex srfi-18)
(trace-call-sites #t)
(trace 
  ;; db:get-tests-for-run
  ;; rmt:general-open-connection
  ;; rmt:open-main-connection
  ;; rmt:drop-conn
  ;; rmt:send-receive
  ;; rmt:log-to-main
  )


(module junk
	*

  (import big-chicken rmtmod apimod dbmod srfi-18)
  
(define (make-run-id)
  (let* ((s (conc (current-process-id)))
	 (l (string-length s)))
    (string->number (conc (string-ref s (- l 1))))))

(define th1 
  (make-thread
    (lambda ()
(let loop ((r 1)
	   (i 1))
   (print "register-test "r" test"i)
   (rmt:register-test r "test1" (conc "item_" i))
   (if (< i 100000)
       (loop r (+ i 1))
       (if (< r 100)
	   (begin
	      (print "get-tests-for-run "r)
              (rmt:get-tests-for-run r "%" '() '() 0 #f #f #f #f #f 0 #f)
 	      (loop (+ r 1) 0)))))
)))
(thread-start! th1)
(thread-join! th1)
(define (run)
  (let* ((th1 (make-thread
	       (lambda ()
		 (let loop ((r (* 20 (make-run-id)))
			    (i 1))
		   (print "register-test "r" test"i)
		   (rmt:register-test r "test1" (conc "item_" i))
		   (if (< i 100000)
		       (loop r (+ i 1))
		       (if (< r 100)
			   (begin
			     (print "get-tests-for-run "r)
			     (rmt:get-tests-for-run r "%" '() '() 0 #f #f #f #f #f 0 #f)
			     (loop (+ r 1) 0)))))
		 ))))
    (thread-start! th1)
    (thread-join! th1)))

)

(import junk)
(run)



Modified ulex-trials/ulex-test.scm from [a81f0cc6e1] to [563b467581].



1

2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22
23





24
25
26
27
28
29
30
1
2

3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22



23
24
25
26
27
28
29
30
31
32
33
34
+
+
-
+











-
+







-
-
-
+
+
+
+
+







(include "../ulex/ulex.scm")

(module nng-test *
(module ulex-test *
	
(import scheme
	(chicken io)
	(chicken base)
	(chicken time)
	(chicken file)
	(chicken file posix)
        (chicken string)
	(chicken process-context)
	(chicken process-context posix)
        miscmacros
        nng
;;         nng
        srfi-18
	srfi-69
        test
	matchable
	typed-records
	system-information
	directory-utils
	)

(define help "Usage: nng-test COMMAND

	ulex
	)

(define help "Usage: ulex-test COMMAND
  where COMMAND is one of:
    do-test              : run the basic req/rep test
    run tcp://host:port  : start test server - start several in same dir
")

(define address-tcp-1 "tcp://localhost:5555")
(define address-tcp-2 "tcp://localhost:6666")