Browse Source

Update docs

develop-0.1.9
Pedram Nimreezi 10 years ago
parent
commit
76cd78b769
1 changed files with 15 additions and 7 deletions
  1. +15
    -7
      README.org

+ 15
- 7
README.org View File

@ -134,11 +134,14 @@ The previous example will produce and is equivalent to:
# Composing Modules #
* Composing Modules
- All query modules must be compiled before use
To compose a module you will take your Query defined above and compile it.
#+BEGIN_EXAMPLE
glc:compile(Module, Query).
glc:compile(Module, Query, State).
glc:compile(Module, Query, State, ResetStatistics).
#+END_EXAMPLE
@ -200,14 +203,16 @@ Return all stored values in this query module.
#+END_EXAMPLE
# Composing Modules with stored state #
* Composing Modules with stored state
- You can create query modules with local state to compare to event data in `with' and `run'
To compose a module with state data you will add a third argument (orddict).
#+BEGIN_EXAMPLE
glc:compile(Module, Query, [{stored, value}]).
#+END_EXAMPLE
# Accessing stored state data #
* Accessing stored state data in constant time
- You can use query modules in a way similar to mochiglobal
Return the stored value in this query module.
#+BEGIN_EXAMPLE
@ -215,7 +220,9 @@ Return the stored value in this query module.
#+END_EXAMPLE
# Executing jobs #
* Job processing through composed modules
- You can use query modules to execute jobs, if the job doesn't error, process an event.
- `with' is similar to `run', the main difference is additional statistics and execution order
To execute a job through the query module, inputting an event on success.
#+BEGIN_EXAMPLE
@ -225,7 +232,7 @@ To execute a job through the query module, inputting an event on success.
end, Event).
#+END_EXAMPLE
# Event Processing Statistics #
* Event Processing Statistics
Return the number of input events for this query module.
#+BEGIN_EXAMPLE
@ -243,7 +250,7 @@ glc:filter(Module).
#+END_EXAMPLE
# Job Processing Statistics #
* Job Processing Statistics
Return the number of job runs for this query module.
#+BEGIN_EXAMPLE
@ -266,7 +273,8 @@ glc:job_time(Module).
#+END_EXAMPLE
# Tips & Tricks #
* Some Tips & Tricks
- This is really just a drop in the bucket.
Return the average time jobs took for this query module.
#+BEGIN_EXAMPLE

Loading…
Cancel
Save