]> zoso.dev Git - libnemo.git/commitdiff
Get rid of extraneous logging.
authorChris Duncan <chris@zoso.dev>
Thu, 12 Dec 2024 06:30:44 +0000 (22:30 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 12 Dec 2024 06:30:44 +0000 (22:30 -0800)
src/lib/workers/pow.ts

index ce89a60d7b4d3287b48eb35ee16e290ae3fd4636..ad26e337d46971cf009841d62547b0e841e12210 100644 (file)
@@ -231,7 +231,6 @@ export class Pow {
                        }
                }`
 
-               console.log(`shaders start: ${performance.now()}`)
                const vertexShader = this.gl.createShader(this.gl.VERTEX_SHADER)
                if (vertexShader == null)
                        throw 'error creating vertex shader'
@@ -293,27 +292,18 @@ export class Pow {
                // Draw output until success or progressCallback says to stop
                const work0 = new Uint8Array(4)
                const work1 = new Uint8Array(4)
-               console.log(`shaders end: ${performance.now()}`)
 
                const draw = (): void => {
                        if (this.gl == null) throw new Error('webgl2_required')
                        const start = performance.now()
-                       console.log(`crypto start: ${performance.now()}`)
                        crypto.getRandomValues(work0)
                        crypto.getRandomValues(work1)
-                       console.log(`crypto end: ${performance.now()}`)
 
-                       console.log(`uiv start: ${performance.now()}`)
                        this.gl.uniform4uiv(work0Location, work0)
                        this.gl.uniform4uiv(work1Location, work1)
-                       console.log(`uiv end: ${performance.now()}`)
 
-                       console.log(`clear start: ${performance.now()}`)
                        this.gl.clear(this.gl.COLOR_BUFFER_BIT)
-                       console.log(`clear end: ${performance.now()}`)
-                       console.log(`draw start: ${performance.now()}`)
                        this.gl.drawArrays(this.gl.TRIANGLES, 0, 6)
-                       console.log(`draw end: ${performance.now()}`)
                        const pixels = new Uint8Array(this.gl.drawingBufferWidth * this.gl.drawingBufferHeight * 4)
 
                        console.log(`start readPixels: ${performance.now()}`)
@@ -323,7 +313,6 @@ export class Pow {
                        // Check the pixels for any success
                        for (let i = pixels.length - 4; i >= 0; i -= 4) {
                                if (pixels[i] !== 0) {
-                                       console.log(`found: ${performance.now()}`)
                                        console.log(`frame time: ${performance.now() - start}`)
                                        // Return the work value with the custom bits
                                        typeof callback === 'function' &&