more clever CSS to beautify spacetrace just a bit

(not part of build)


git-svn-id: svn://10.0.0.236/trunk@141508 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
2003-04-21 07:26:07 +00:00
parent 48096e612c
commit c522483a46
3 changed files with 63 additions and 48 deletions

View File

@@ -921,7 +921,7 @@ int displayCategoryReport(STRequest* inRequest, STCategoryNode *root, int depth)
{
PR_fprintf(inRequest->mFD,
"<table class=\"category-list data\">\n"
" <tr>\n"
" <tr class=\"row-header\">\n"
" <th>Category</th>\n"
" <th>Composite Byte Size</th>\n"
" <th>%% of Total Size</th>\n"

View File

@@ -2352,21 +2352,21 @@ void htmlHeader(STRequest* inRequest, const char* aTitle)
"</head>\n"
"<body>\n"
"<div class=spacetrace-header>\n"
"<table class=main>"
"<tr>"
"<td class=\"category-title header-text\">Category: <span class=\"current-category\">%s</span></td>\n"
, aTitle,
"<div class=navigate>\n"
"<span class=\"category-title header-text\">Category:</span>\n"
"<span class=\"current-category\">%s</span>\n",
aTitle,
inRequest->mOptions.mCategoryName);
PR_fprintf(inRequest->mFD,"<td class=\"header-item\">");
PR_fprintf(inRequest->mFD,"<span class=\"header-item\">");
htmlAnchor(inRequest, "index.html", "Index", NULL, "header-menuitem", &inRequest->mOptions);
PR_fprintf(inRequest->mFD,"</td>\n");
PR_fprintf(inRequest->mFD,"</span>\n");
PR_fprintf(inRequest->mFD,"<td class=\"header-item\">");
PR_fprintf(inRequest->mFD,"<span class=\"header-item\">");
htmlAnchor(inRequest, "options.html", "Options", NULL, "header-menuitem", &inRequest->mOptions);
PR_fprintf(inRequest->mFD,"</td>\n");
PR_fprintf(inRequest->mFD,"</span>\n");
PR_fprintf(inRequest->mFD,"</tr></table>\n");
PR_fprintf(inRequest->mFD,"</div>\n");
PR_fprintf(inRequest->mFD, "</div>\n<div class=\"header-separator\"></div>\n");
}
@@ -2686,7 +2686,7 @@ int displayTopAllocations(STRequest* inRequest, STRun* aRun, int aWantCallsite)
STAllocation* current = NULL;
PR_fprintf(inRequest->mFD, "<table class=\"data\">\n");
PR_fprintf(inRequest->mFD, "<tr>\n");
PR_fprintf(inRequest->mFD, "<tr class=\"row-header\">\n");
PR_fprintf(inRequest->mFD, "<th>Rank</th>\n");
PR_fprintf(inRequest->mFD, "<th>Index</th>\n");
PR_fprintf(inRequest->mFD, "<th>Byte Size</th>\n");
@@ -2799,7 +2799,7 @@ int displayMemoryLeaks(STRequest* inRequest, STRun* aRun)
STAllocation* current = NULL;
PR_fprintf(inRequest->mFD, "<table class=\"data\">\n");
PR_fprintf(inRequest->mFD, "<tr>\n");
PR_fprintf(inRequest->mFD, "<tr class=\"row-header\">\n");
PR_fprintf(inRequest->mFD, "<th>Rank</th>\n");
PR_fprintf(inRequest->mFD, "<th>Index</th>\n");
PR_fprintf(inRequest->mFD, "<th>Byte Size</th>\n");
@@ -2944,15 +2944,16 @@ int displayCallsites(STRequest* inRequest, tmcallsite* aCallsite, int aFollow, P
{
headerDisplayed = __LINE__;
PR_fprintf(inRequest->mFD, "<table class=\"data\">\n");
PR_fprintf(inRequest->mFD, "<tr>\n");
PR_fprintf(inRequest->mFD, "<th class=\"callsite\">Callsite</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Byte Size</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Seconds</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Weight</th>\n");
PR_fprintf(inRequest->mFD, "<th>Heap Object Count</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Heap Operation Seconds</th>\n");
PR_fprintf(inRequest->mFD, "</tr>\n");
PR_fprintf(inRequest->mFD,
"<table class=\"data\">\n"
"<tr class=\"row-header\">\n"
"<th class=\"callsite\">Callsite</th>\n"
"<th><abbr title=\"Composite Size\">C. Size</abbr></th>\n"
"<th><abbr title=\"Composite Seconds\">C. Seconds</abbr></th>\n"
"<th><abbr title=\"Composite Weight\">C. Weight</abbr></th>\n"
"<th><abbr title=\"Heap Object Count\">H.O. Count</abbr></th>\n"
"<th><abbr title=\"Composite Heap Operation Seconds\">C.H. Operation (sec)</abbr></th>\n"
"</tr>\n");
}
/*
@@ -3067,7 +3068,7 @@ int displayAllocationDetails(STRequest* inRequest, STAllocation* aAllocation)
PR_fprintf(inRequest->mFD, "Allocation %u Details:<p>\n", aAllocation->mRunIndex);
PR_fprintf(inRequest->mFD, "<table class=\"data-header\">\n");
PR_fprintf(inRequest->mFD, "<table class=\"data summary\">\n");
PR_fprintf(inRequest->mFD, "<tr><td align=left>Final Size:</td><td align=right>%u</td></tr>\n", bytesize);
PR_fprintf(inRequest->mFD, "<tr><td align=left>Lifespan Seconds:</td><td align=right>" ST_TIMEVAL_FORMAT "</td></tr>\n", ST_TIMEVAL_PRINTABLE(timeval));
PR_fprintf(inRequest->mFD, "<tr><td align=left>Weight:</td><td align=right>%llu</td></tr>\n", weight64);
@@ -3362,17 +3363,17 @@ int displayTopCallsites(STRequest* inRequest, tmcallsite** aCallsites, PRUint32
{
headerDisplayed = __LINE__;
PR_fprintf(inRequest->mFD, "<table class=\"data\">\n");
PR_fprintf(inRequest->mFD, "<tr>\n");
PR_fprintf(inRequest->mFD, "<th>Rank</th>\n");
PR_fprintf(inRequest->mFD, "<th class=\"callsite\">Callsite</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Size</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Seconds</th>\n");
PR_fprintf(inRequest->mFD, "<th>Composite Weight</th>\n");
PR_fprintf(inRequest->mFD, "<th>Heap Object Count</th>\n");
PR_fprintf(inRequest->mFD, "<th>Heap Operation Seconds</th>\n");
PR_fprintf(inRequest->mFD, "</tr>\n");
PR_fprintf(inRequest->mFD,
"<table class=\"data\">\n"
"<tr class=\"row-header\">\n"
"<th>Rank</th>\n"
"<th class=\"callsite\">Callsite</th>\n"
"<th><abbr title=\"Composite Size\">C. Size</abbr></th>\n"
"<th><abbr title=\"Composite Seconds\">C. Seconds</abbr></th>\n"
"<th><abbr title=\"Composite Weight\">C. Weight</abbr></th>\n"
"<th><abbr title=\"Heap Object Count\">H.O. Count</abbr></th>\n"
"<th><abbr title=\"Composite Heap Operation Seconds\">C.H. Operation (sec)</abbr></th>\n"
"</tr>\n");
}
displayed++;
@@ -3480,7 +3481,7 @@ int displayCallsiteDetails(STRequest* inRequest, tmcallsite* aCallsite)
PR_fprintf(inRequest->mFD, "<b>%s</b>+%u(%u) Callsite Details:<p>\n", tmmethodnode_name(aCallsite->method), aCallsite->offset, (PRUint32)aCallsite->entry.key);
}
PR_fprintf(inRequest->mFD, "<table class=\"data\">\n");
PR_fprintf(inRequest->mFD, "<table class=\"data summary\">\n");
PR_fprintf(inRequest->mFD, "<tr><td>Composite Byte Size:</td><td align=right>%u</td></tr>\n", thisRun->mStats[inRequest->mContext->mIndex].mSize);
PR_fprintf(inRequest->mFD, "<tr><td>Composite Seconds:</td><td align=right>" ST_TIMEVAL_FORMAT "</td></tr>\n", ST_TIMEVAL_PRINTABLE64(thisRun->mStats[inRequest->mContext->mIndex].mTimeval64));
PR_fprintf(inRequest->mFD, "<tr><td>Composite Weight:</td><td align=right>%llu</td></tr>\n", thisRun->mStats[inRequest->mContext->mIndex].mWeight64);
@@ -5659,7 +5660,7 @@ void handleClient(void* inArg)
** mime type, otherwise, say it is text/html.
*/
PR_fprintf(aFD, "HTTP/1.1 200 OK%s", crlf);
PR_fprintf(aFD, "Server: %s%s", "$Id: spacetrace.c,v 1.40 2003-04-17 07:36:28 alecf%netscape.com Exp $", crlf);
PR_fprintf(aFD, "Server: %s%s", "$Id: spacetrace.c,v 1.41 2003-04-21 07:26:05 alecf%netscape.com Exp $", crlf);
PR_fprintf(aFD, "Content-type: ");
if(NULL != strstr(start, ".png"))
{

View File

@@ -1,18 +1,25 @@
/* header stuff */
table.main {
position: relative;
right: 0px;
border-spacing: 0px;
body {
margin: 0px;
padding: 0px;
}
/* header stuff */
.spacetrace-header {
border: 2px inset;
float: right;
background: green;
min-height: 2em;
}
.navigate {
background: lightgrey;
position: absolute;
right: 0px;
margin: 0px;
padding: 2px;
}
.header-item {
border: 2px outset;
background: lightgrey;
margin: 0px;
}
.header-item > a {
@@ -21,14 +28,12 @@ table.main {
}
.category-title, .header-item {
padding: 2px;
margin: 0px;
.header-item {
font-weight: bold;
}
.category-title {
background: lightgrey;
font-weight: bold;
}
/* footer stuff */
@@ -49,20 +54,29 @@ table.main {
/* headers at the top of specific call site pages */
table.data-header {
table.summary {
border: 1px solid black;
}
/* lists of callsites/etc */
table.data td {
border-top: 1px solid;
padding: 5px;
}
table.data {
clear: right;
border-collapse: collapse;
}
tr.row-header {
background: #009090;
width: 100%;
}
table.data th {
padding: 5px;
margin: 0px;
text-align: right;
}