Closed
Bug 328066
Opened 19 years ago
Closed 19 years ago
implement bzip2 compression for sending metrics log
Categories
(Toolkit Graveyard :: Data Collection/Metrics, defect, P1)
Toolkit Graveyard
Data Collection/Metrics
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8.1
People
(Reporter: bryner, Assigned: darin.moz)
Details
Attachments
(1 file)
|
28.43 KB,
patch
|
Details | Diff | Splinter Review |
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Updated•19 years ago
|
QA Contact: nobody → metrics
| Assignee | ||
Comment 2•19 years ago
|
||
Attachment #213403 -
Flags: first-review?(bryner)
| Assignee | ||
Comment 3•19 years ago
|
||
I decided to go the simple route for now and just statically link in the bzip2 library. I'll probably revise this code once Necko provides a generic compression API.
No longer depends on: 328126
| Reporter | ||
Comment 4•19 years ago
|
||
Comment on attachment 213403 [details] [diff] [review]
v1 patch
>--- src/nsMetricsService.cpp 21 Feb 2006 19:36:50 -0000 1.3
>+++ src/nsMetricsService.cpp 28 Feb 2006 02:36:33 -0000
>@@ -135,94 +143,156 @@ nsMetricsService::LogEvent(const nsAStri
>+NS_IMETHODIMP
>+nsMetricsService::Flush()
>+{
...
>+ PR_Close(fd);
>+ NS_ENSURE_STATE(succeeded);
>+
>+ // Create a new mRoot
>+ rv = CreateRoot();
>+ NS_ENSURE_SUCCESS(rv, rv);
>+
So if writing the data fails for some reason, this will make us retain the data in memory. I guess that's probably the best way to handle it, since it could be a temporary failure of some sort.
>@@ -233,20 +303,51 @@ nsMetricsService::Observe(nsISupports *s
>+/*static*/ NS_METHOD
>+nsMetricsService::Create(nsISupports *outer, const nsIID &iid, void **result)
>+{
It's not clear to me what this gets us that NS_GENERIC_FACTORY_CONSTRUCTOR_INIT doesn't.
Looks ok otherwise.
Attachment #213403 -
Flags: first-review?(bryner) → first-review+
| Assignee | ||
Comment 5•19 years ago
|
||
> So if writing the data fails for some reason, this will make us retain the
> data in memory. I guess that's probably the best way to handle it, since it
> could be a temporary failure of some sort.
Yeah, that's true. I think it's okay.
> >@@ -233,20 +303,51 @@ nsMetricsService::Observe(nsISupports *s
> >+/*static*/ NS_METHOD
> >+nsMetricsService::Create(nsISupports *outer, const nsIID &iid, void **result)
> >+{
>
> It's not clear to me what this gets us that NS_GENERIC_FACTORY_CONSTRUCTOR_INIT
> doesn't.
I can't use nsMetricsService::get() with NS_GENERIC_FACTORY_CONSTRUCTOR_INIT because nsMetricsService::get() calls do_GetService. The result would be infinite recursion. I wrote it that way once before arriving at the current solution. I'll add a comment if you want ;-)
| Assignee | ||
Comment 6•19 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 7•19 years ago
|
||
doesn't public/nsIMetricsService.idl need a new IID?
| Assignee | ||
Comment 8•19 years ago
|
||
I didn't bother since we haven't released any software with this code. It isn't built by default.
Comment 9•19 years ago
|
||
ah, ok.
You need to log in
before you can comment on or make changes to this bug.
Description
•