Skip to content

Instantly share code, notes, and snippets.

View natduca's full-sized avatar

Nat Duca natduca

  • Google
  • Menlo Park, CA
View GitHub Profile
#!/usr/bin/env python
# git clone https://github.com/catapult-project/catapult.git
# hb.py > foo
# $catapult/tracing/bin/trace2html foo
# gives you foo.html
text = """
HHHHHHHHH HHHHHHHHH BBBBBBBBBBBBBBBBB iiii tttt hhhhhhh d::::::d JJJJJJJJJJJ iiii !!!
H:::::::H H:::::::H B::::::::::::::::B i::::i ttt:::t h:::::h d::::::d J:::::::::J i::::i !!:!!
H:::::::H H:::::::H B::::::BBBBBB:::::B iiii
diff --git a/tracing/tracing/ui/base/drag_handle.html b/tracing/tracing/ui/base/drag_handle.html
index 059f472..d919bbb 100644
--- a/tracing/tracing/ui/base/drag_handle.html
+++ b/tracing/tracing/ui/base/drag_handle.html
@@ -27,7 +27,6 @@ found in the LICENSE file.
flex: 0 0 auto;
height: 7px;
position: relative;
- z-index: 10;
}
diff --git a/components/tracing/tracing_messages.h b/components/tracing/tracing_messages.h
index 11196e3..ca79708 100644
--- a/components/tracing/tracing_messages.h
+++ b/components/tracing/tracing_messages.h
@@ -132,3 +132,6 @@ IPC_MESSAGE_CONTROL2(TracingHostMsg_ProcessMemoryDumpResponse,
IPC_MESSAGE_CONTROL1(TracingHostMsg_TriggerBackgroundTrace,
std::string /* name */)
+
+
diff --git a/tracing/tracing/base/task.html b/tracing/tracing/base/task.html
index bd876cb..6188bf7 100644
--- a/tracing/tracing/base/task.html
+++ b/tracing/tracing/base/task.html
@@ -46,11 +46,14 @@ tr.exportTo('tr.b', function() {
}
Task.prototype = {
+ get name() {
+ return this.runCb_.name;
+ tv.e.audits.mergeEvents(
+ allLatencyEvents.map(function(event) {
+ return {start: event.start, end: event.start, event: event
+ },
+ 150,
+ function(eventsToMerge) {
+ var events = eventsToMerge.map(function(e) { return e.event; });
+
+ var e0 = events[0];
+ var colorId = tv.b.ui.getColorIdForGeneralPurposeString('mt_input');
exportTo('tv.c.analysis', function() {
var currentDisplayUnit = ms;
var displayUnitChangedListeners = [];
var Time = {
get displayUnit() { return currentDisplayUnit; },
set displayUnit(displayUnit) {
this.currentDisplayUnit = displayUnit;
var e = new Event('display-unit-changed');
displayUnitChangedListeners.forEach(function(cb) { cb.call(e); });
@natduca
natduca / gist:1108568
Created July 27, 2011 03:00
Break into pdb on unittest assertion error
import unittest, exceptions, pdb
class PDBAssertionError(exceptions.AssertionError):
def __init__(self, *args):
exceptions.AssertionError.__init__(self, *args)
print "Assertion failed, entering PDB..."
if hasattr(sys, '_getframe'):
pdb.Pdb().set_trace(sys._getframe().f_back.f_back)
else:
pdb.set_trace()
unittest.TestCase.failureException = PDBAssertionError
@natduca
natduca / gist:803761
Created January 31, 2011 08:06
Commit flow for LayerRendererChromium
class LayerChromium {
public:
LayerChromium() {
m_needsCommit = 0;
m_parent = NULL;
}
~LayerChromium() {
m_compositorLayer = NULL; // will not cause a delete --- the parent compositorLayer should hold a reference, too
}
void addChild(LayerChromium* child) {