Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
7eb9536c
Commit
7eb9536c
authored
Feb 25, 2011
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove stale file
parent
26185dab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
benchmark.js
benchmark/benchmark.js
+0
-46
No files found.
benchmark/benchmark.js
deleted
100644 → 0
View file @
26185dab
var
Benchmark
=
require
(
'benchmark'
);
var
sqlite3
=
require
(
'../lib/sqlite3'
);
var
suite
=
new
Benchmark
.
Suite
;
var
iterations
=
10000
;
// add tests
suite
.
add
(
'insert without transaction'
,
function
()
{
var
bench
=
this
;
var
db
=
new
sqlite3
.
Database
(
''
);
db
.
serialize
(
function
()
{
db
.
run
(
"CREATE TABLE foo (id INT, txt TEXT)"
);
var
stmt
=
db
.
prepare
(
"INSERT INTO foo VALUES (?, ?)"
);
for
(
var
i
=
0
;
i
<
iterations
;
i
++
)
{
stmt
.
run
(
i
,
'Row '
+
i
);
}
stmt
.
finalize
();
});
db
.
close
(
function
()
{
bench
.
emit
(
'complete'
);
});
},
{
onComplete
:
function
()
{
console
.
log
(
'compelte2'
);
}
})
.
add
(
'insert with transaction'
,
function
()
{
'Hello World!'
.
indexOf
(
'o'
)
>
-
1
;
})
// add listeners
suite
.
on
(
'cycle'
,
function
(
bench
)
{
console
.
log
(
String
(
bench
));
})
.
on
(
'complete'
,
function
()
{
console
.
log
(
'Fastest is '
+
this
.
filter
(
'fastest'
).
pluck
(
'name'
));
})
.
run
(
true
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment