Skip to content

Commit 8252561

Browse files
committed
Added spldoc to RegexMatchSample.
1 parent e2b6288 commit 8252561

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

samples/RegexMatchSample/sample/RegexMatchSample.spl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@ namespace sample;
22

33
use com.ibm.streamsx.regex.re2::RegexMatch;
44

5+
/**
6+
* RegexMatchSample
7+
* Run two separate streams:
8+
* 1. Performance test - Beacon shoots 10,000,000 tuples. No output.
9+
* 2. Functional test - Beacon outputs intermittently 2 patterns ("^Hello" and "Hello$") and 1 string to match ("Hello World " + count).
10+
* The result:
11+
*
12+
* Hello World 0,true
13+
* Hello World 1,false
14+
* Hello World 2,true
15+
* Hello World 3,false
16+
*/
517
composite RegexMatchSample {
618
graph
719
(stream<rstring str> Beacon_1_out0)as Beacon_1 = Beacon(){
@@ -13,7 +25,7 @@ composite RegexMatchSample {
1325

1426
(stream<rstring str, rstring pattern> Beacon_2_out0)as Beacon_2 = Beacon(){
1527
param
16-
iterations : 10 ;
28+
iterations : 4 ;
1729
output
1830
Beacon_2_out0 :
1931
pattern = (int32)IterationCount() % 2 == 0 ? "^Hello" : "Hello$",

0 commit comments

Comments
 (0)