⍝ Timing test script for [create] and [remove]:
⍝
⍝     test 'create_remove'      ⍝ performance timing test.
⍝   1 test 'create_remove'      ⍝ performance timing test (show progress).
⍝
⍝     set [loops] and [fields] to suit your machine:

    getenv←{⍎⊃(0=⎕nc ⍵)↓ ⍵ '⍺'}             ⍝ get environment variable.

    loops  ← 1000 getenv 'loops'            ⍝ default 1000 loops.
    fields ←   10 getenv 'fields'           ⍝ default 10 fields.

    +ddb.remove'ddb test'                   ⍝ ensure file removed.
0
    defs ← {⍵ 80 10}¨,\fields⍴⎕a            ⍝ field definitions.

    create←{'ddb test' ddb.create defs}     ⍝ create table.

    {}⎕wa                                   ⍝ compact for consistent test.

    {} ddb.remove∘create¨time ⍳loops        ⍝ create/remove timing test.

⍝   
⍝   Back to: Contents