File: drop-performance-tests.patch

package info (click to toggle)
node-lib0 0.2.99-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,100 kB
  • sloc: javascript: 7,746; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 1,118 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: drop all performance tests
 Slow machines aren't able to run them, and they are flaky anyway
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2023-08-21

--- a/encoding.test.js
+++ b/encoding.test.js
@@ -127,6 +127,7 @@
   t.assert(encoding.hasContent(encoder))
 }
 
+/*
 export const testStringEncodingPerformanceNativeVsPolyfill = () => {
   const largeRepetitions = 20
   let bigstr = ''
@@ -276,6 +277,7 @@
   })
   t.assert(durationConcatElements < 2 * durationSingleElements, 'We expect that the second approach is faster. If this fails, our expectantion is not met in your javascript environment. Please report this issue.')
 }
+*/
 
 /**
  * @param {t.TestCase} _tc
--- a/array.test.js
+++ b/array.test.js
@@ -4,7 +4,7 @@
 /**
  * @param {t.TestCase} _tc
  */
-export const testIsarrayPerformance = _tc => {
+const testIsarrayPerformance = _tc => {
   const N = 100000
   /**
    * @type {Array<any>}
@@ -38,6 +38,7 @@
   t.assert(timeIsarray < timeConstructor * 2, 'Expecting that isArray is not much worse than a constructor check')
 }
 
+
 /**
  * @param {t.TestCase} _tc
  */