INNER CODE UNIT · TypeScript

Bluebird

SierraSoftworks/Iridium · benchmarks/mongodb.ts:80

    return new Bluebird((resolve, reject) => {
        iDB.connection.collection("mongodb").deleteMany({},(err) => {
            if (err) return reject(err);
            return resolve({});
        });
    });
},(objects) => {
        return new Bluebird<any>((resolve, reject) => {
            iDB.connection.collection("mongodb").insertMany(objects,(err, objects) => {
                if (err) return reject(err);
                return resolve(objects);
            });
        });
    }))
    .then(() => benchmark("Iridium insert()",() => iDB.User.remove(),(objects) => iDB.User.insert(objects), "MongoDB insert()"))
    .then(() => benchmark("Iridium Instances insert()",() => iDB.UserWrapped.remove(),(objects) => iDB.UserWrapped.insert(objects), "MongoDB insert()"))

    .then(() => benchmark("MongoDB find()",() => null,() => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…