diff options
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/debug/tracer_test.html')
-rw-r--r-- | contexts/data/lib/closure-library/closure/goog/debug/tracer_test.html | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/debug/tracer_test.html b/contexts/data/lib/closure-library/closure/goog/debug/tracer_test.html deleted file mode 100644 index 42ee34b..0000000 --- a/contexts/data/lib/closure-library/closure/goog/debug/tracer_test.html +++ /dev/null @@ -1,57 +0,0 @@ -<!DOCTYPE html> -<html> -<!-- -Copyright 2006 The Closure Library Authors. All Rights Reserved. - -Use of this source code is governed by the Apache License, Version 2.0. -See the COPYING file for details. ---> -<head> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<title>Closure Unit Tests - goog.util.Tracer</title> -<script src="../base.js"></script> -<script> - goog.require('goog.debug.Trace'); - goog.require('goog.testing.jsunit'); -</script> -</head> -<body> -<script> - - function testTracer() { - goog.debug.Trace.initCurrentTrace(); - var t = goog.debug.Trace.startTracer('foo'); - var sum = 0; - for (var i = 0; i < 100000; i++) { - sum += i; - } - goog.debug.Trace.stopTracer(t); - var trace = goog.debug.Trace.getFormattedTrace(); - var lines = trace.split('\n'); - assertEquals(8, lines.length); - assertNotNull(lines[0].match(/^\s*\d+\.\d+\s+Start\s+foo$/)); - assertNotNull(lines[1].match(/^\s*\d+\s+\d+\.\d+\s+Done\s+\d+ ms\s+foo$/)); - } - - function testPerf() { - goog.debug.Trace.initCurrentTrace(); - var count = 1000; - var start = goog.now(); - for (var i = 0; i < count; i++) { - var t = goog.debug.Trace.startTracer('foo'); - var t2 = goog.debug.Trace.startTracer('foo.bar'); - var t3 = goog.debug.Trace.startTracer('foo.bar.baz'); - goog.debug.Trace.stopTracer(t3); - var t4 = goog.debug.Trace.startTracer('foo.bar.bim'); - goog.debug.Trace.stopTracer(t4); - goog.debug.Trace.stopTracer(t2); - goog.debug.Trace.stopTracer(t); - } - count *= 4; - var end = goog.now(); - } - - -</script> -</body> -</html> |