mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Add Tooltip to Plot Titles Showing Full File Path
Gives a little extra context when the full file path could be useful.
This commit is contained in:
parent
4e6d1690ef
commit
2056d9253c
@ -446,6 +446,7 @@ var Profile = /** @class */ (function () {
|
||||
plot_title_sel.enter().append('div').attr('class', 'plot-title');
|
||||
plot_title_sel.text(function (d) { return d; })
|
||||
.classed('path', true)
|
||||
.attr('title', function (d) { return d; })
|
||||
.style('width', div_width + 'px');
|
||||
plot_title_sel.exit().remove();
|
||||
/****** Update scales ******/
|
||||
|
File diff suppressed because one or more lines are too long
@ -75,73 +75,6 @@ function remove_duplicates(array) {
|
||||
}
|
||||
return Object.keys(uniq).map(function (key) { return uniq[key]; });
|
||||
}
|
||||
{
|
||||
var test_data = [
|
||||
"/home/fitzgen/walrus/src/lib.rs",
|
||||
"/home/fitzgen/walrus/src/passes/mod.rs",
|
||||
"/home/fitzgen/rayon/src/lib.rs",
|
||||
"/home/fitzgen/rayon/src/spawner/mod.rs"
|
||||
];
|
||||
console.log(test_data);
|
||||
console.log(get_minimum_parts_for_unique_path(test_data));
|
||||
}
|
||||
{
|
||||
var test_data = [
|
||||
"/a/b/c/test.cpp:135",
|
||||
"/a/b/c/test.cpp:145",
|
||||
"/a/b/c/test.cpp:251",
|
||||
];
|
||||
console.log(test_data);
|
||||
console.log(get_minimum_parts_for_unique_path(test_data));
|
||||
}
|
||||
{
|
||||
var test_data = [
|
||||
"src/lib.rs:330",
|
||||
"src/lib.rs:367",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:3261",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/slice/mod.rs:5348",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:197",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1563",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1787",
|
||||
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.1/src/x86/sse2.rs:0",
|
||||
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/parse_wiki_text-0.1.5/src/table.rs:288",
|
||||
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/quick-xml-0.16.1/src/reader.rs:0",
|
||||
];
|
||||
console.log(test_data);
|
||||
console.log(get_minimum_parts_for_unique_path(test_data));
|
||||
}
|
||||
{
|
||||
var test_data = [
|
||||
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.5/src/error/error_impl.rs:23",
|
||||
"/home/cmchenry/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.3.1/src/dfa.rs:1742",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/ir/mod.rs:209",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:0",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:175",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:178",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:192",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/local_function/context.rs:200",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/module/functions/mod.rs:306",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/tombstone_arena.rs:62",
|
||||
"/home/cmchenry/workspace/rust/walrus/src/tombstone_arena.rs:67",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/alloc.rs:208",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/alloc.rs:82",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/boxed.rs:116",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:0",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:230",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/raw_vec.rs:492",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:1101",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/liballoc/vec.rs:2003",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/alloc.rs:242",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/cmp.rs:978",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/num/mod.rs:3399",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:197",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/ptr/mod.rs:783",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/result.rs:800",
|
||||
"/rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/stdsimd/crates/core_arch/src/x86/sse2.rs:1401"
|
||||
];
|
||||
console.log(test_data);
|
||||
console.log(get_minimum_parts_for_unique_path(test_data));
|
||||
}
|
||||
function display_warning(title, text) {
|
||||
var warning = $("<div class=\"alert alert-warning alert-dismissible\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n <strong>" + title + ":</strong> " + text + "\n </div>");
|
||||
$('#warning-area').append(warning);
|
||||
|
File diff suppressed because one or more lines are too long
@ -539,6 +539,7 @@ class Profile {
|
||||
plot_title_sel.enter().append('div').attr('class', 'plot-title');
|
||||
plot_title_sel.text(function(d) { return d; })
|
||||
.classed('path', true)
|
||||
.attr('title', function(d) { return d; })
|
||||
.style('width', div_width+'px');
|
||||
plot_title_sel.exit().remove();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user