mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 09:59:13 +00:00
feat!: surrealdb 2.0, remove CreateVersion::Single, fix OVERWRITE_DB
This commit is contained in:
parent
6dcb9fd043
commit
4663a862a4
13 changed files with 328 additions and 245 deletions
|
@ -20,23 +20,6 @@ async fn inti_db() -> Result<Surreal<Db>, Error> {
|
|||
fn bench(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("Create DB Entities");
|
||||
|
||||
group.bench_function("Single Insert", |b| {
|
||||
b.iter(|| {
|
||||
let rt = Runtime::new().unwrap();
|
||||
rt.block_on(async {
|
||||
let db = inti_db().await.unwrap();
|
||||
let reader = File_Format::new("json")
|
||||
.reader("tests/data/bench.json")
|
||||
.unwrap();
|
||||
|
||||
CreateVersion::Single
|
||||
.run(Some(db.clone()), reader, None, 1000, 100)
|
||||
.await
|
||||
.unwrap();
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
group.bench_function("Bulk Insert", |b| {
|
||||
b.iter(|| {
|
||||
let rt = Runtime::new().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue