mirror of
https://git.stupid.fish/teidesu/scripts.git
synced 2025-07-28 02:32:11 +10:00
chore: update public repo
This commit is contained in:
parent
ce9f435ef2
commit
96426d01c1
1 changed files with 17 additions and 0 deletions
17
scripts/misc/hits-nakrutka.ts
Normal file
17
scripts/misc/hits-nakrutka.ts
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import { asyncPool } from '@fuman/utils'
|
||||||
|
import { argv, question } from 'zx'
|
||||||
|
import { counterIter } from '../../utils/counter.ts'
|
||||||
|
|
||||||
|
const url = argv[1] || await question('url > ')
|
||||||
|
const count = argv[2] || await question('count > ')
|
||||||
|
|
||||||
|
const counter = counterIter(0, count)
|
||||||
|
|
||||||
|
await asyncPool(counter.iter, async (i) => {
|
||||||
|
if (i % 100 === 0) {
|
||||||
|
console.log('currently at %d', i)
|
||||||
|
}
|
||||||
|
await fetch(url)
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log('nakrutka done')
|
Loading…
Add table
Add a link
Reference in a new issue