gun icon indicating copy to clipboard operation
gun copied to clipboard

Gun Failed Silently When Doing Put

Open yokowasis opened this issue 4 years ago • 0 comments

The Code

const Gun = require('gun');

const gun = Gun();

console.time("GO")
var arr = {}
var k=1; //Change this each time you run the code
for (let i = (1 + (k-1) * 100); i <= k * 100; i++) {
    arr[i.toString()] = {
        username : `username-${i}`,
        nis : `nis-${i}`,
        password : `password-${i}`,
        nama : `nama-${i}`,
        nik : `nik-${i}`,
        nik2 : `nik2-${i}`,
        status : `status-${i}`,
    };
}

gun.get("siswa").get("IX").get("IT").put(arr,ack=>{
    console.log (ack);
    console.timeEnd("GO")
})

How to reproduce : run the code few times. Each time you run the code, increment the k by 1

yokowasis avatar Oct 09 '21 13:10 yokowasis