The idea is Benchmark the performance of a generic a rdd (with or
without index support)
Counting how many record for secs have processed for
append,skip,index,seek,set filter
How possible Measure in Kbps read and write?
Is possible measure concurrent access  for skip test using MultiThread
is right approach?
Please share here any opinion
follow is a basic sample for explain idea

nrec = 30000
aDbf := {}
AADD( aDbf, { "FN", "N", 10, 0 } )
AADD( aDbf, { "FNF", "N", 12, 4 } )
AADD( aDbf, { "FC", "C", 40, 0 } )
AADD( aDbf, { "FD", "D", 8, 0 } )
AADD( aDbf, { "FL", "L", 1, 0 } )
AADD( aDbf, { "FM", "M", 0, 0 } )
FOR A=1 TO 20
AADD( aDbf, { "FIELD"+ALLTRIM(STR(A)), "C", 10, 0 } )
NEXT A
dbCreate("dbtest",aDbf)
USE dbtest EXCLUSIVE
index on fc + str(fn,10,0) to DBtest_i1

? "Creating test database - inserting", nrec, " records"
use dbtest  SHARED

? "INSERT (NO MEMO): 1200    "
st = seconds()
for i = 1 to nrec
        if mod(i,1000) = 0
                // @ 0, 0 SAY i
        endif
        append blank
        replace fn with INT(sin(i)*i)
        replace fnf with sin(i)*i
        replace fc with replicate( CHR(65+INT(ABS(sin(i)*25)) ), 40 )
        replace fd with date() + MOD(INT(sin(i)*i),10000)
        replace fl with IIF( SIN(i) >= 0, .T., .F. )
next
 commit
tapp = seconds()-st
* ZAP
USE
 ?? INT(nrec/tapp), "recod in one second"


? "SKIP:                     "
USE dbtest SHARED
st = seconds()
go top
while ! eof()
        skip
enddo
USE
tskip = seconds()-st
?? INT((nrec)/tskip), "record in one seconds"


-- 
Massimo Belgrano
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to