Skip to content

Commit 486919c

Browse files
committed
test: write time measurement
1 parent 91bfcec commit 486919c

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Dammit I'm mad
2+
Evil is a deed as I live.
3+
God, am I reviled?
4+
I rise, my bed on a sun, I melt.
5+
To be not one man emanating is sad. I piss.
6+
Alas it is so late. Who stops to help? Man, it is hot.
7+
8+
I'm in it.
9+
I tell.
10+
I am not a devil.
11+
I level "Mad Dog".
12+
13+
Ah, say burning is as a deified gulp
14+
in my halo of a mired rum tin.
15+
I erase many men. Oh, to be man, a sin.
16+
Is evil in a clam? In a trap?
17+
No. It is open.
18+
On it I was stuck.
19+
20+
Rats peed on hope.
21+
Elsewhere dips a web.
22+
Be still if I fill its ebb.
23+
Ew, a spider ... eh?
24+
We sleep.
25+
26+
Oh no!
27+
Deep, stark cuts saw it in one position.
28+
Part animal, can I live? Sin is a name.
29+
Both, one ... my names are in it. Murder?
30+
I'm a fool. A hymn I plug,
31+
Deified as a sign in ruby ash - a Goddam level I lived at.
32+
33+
On mail let it in. I'm it.
34+
Oh, sit in ample hot spots.
35+
Oh, wet!
36+
A loss it is alas (sip). I'd assign it a name.
37+
Name not one bottle minus an ode by me:
38+
"Sir, I deliver. I'm a dog."
39+
Evil is a deed as I live.
40+
Dammit I'm mad.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { join } = require('path')
2+
const { readFileSync } = require('fs')
3+
4+
const { timeAndReport } = require('../../../lib/time')
5+
const solutions = require('./is-palindrome.repo')
6+
7+
const bigPalPath = join(__dirname, '/big-palindrome.txt')
8+
const palindrome = readFileSync(bigPalPath, 'utf-8')
9+
10+
const args = [palindrome]
11+
const runs = 10_000
12+
13+
timeAndReport(solutions, args, runs, 'Is palindrome?')

0 commit comments

Comments
 (0)