Changeset 0181abdce529ba17b164ec0a0165a96b920821f2
- Timestamp:
- 12/30/08 21:48:15
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1230673695 +0000
- git-parent:
[7940b59f502685b82ede05d10c856a31a3a50caf]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1230673695 +0000
- Message:
temp fixes to testing
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rf5b00dc |
r0181abd |
|
| 25 | 25 | stratcon_realtime_ticker(eventer_t old, int mask, void *closure, |
|---|
| 26 | 26 | struct timeval *now) { |
|---|
| 27 | | char buffer[100]; |
|---|
| | 27 | char buffer[1024]; |
|---|
| 28 | 28 | noit_http_session_ctx *ctx = closure; |
|---|
| 29 | 29 | |
|---|
| … | … | |
| 37 | 37 | eventer_t e = eventer_alloc(); |
|---|
| 38 | 38 | gettimeofday(&e->whence, NULL); |
|---|
| 39 | | snprintf(buffer, sizeof(buffer), "<script>reconnoiter_realtime_feed(%lu,'%s','%s','%0.3f');</script>\n", |
|---|
| 40 | | e->whence.tv_sec * 1000 + e->whence.tv_usec / 1000, "A-UUID", "metric-name", (float)(rand() % 100000) / 1000.0); |
|---|
| | 39 | |
|---|
| | 40 | snprintf(buffer, sizeof(buffer), "<script>window.parent.plot_iframe_data('%lu','%s','%0.3f','%lu');</script>\n", |
|---|
| | 41 | (unsigned long)1179, "allocator_requests", (float)(rand() % 100000) / 1000.0, |
|---|
| | 42 | e->whence.tv_sec * 1000 + e->whence.tv_usec / 100); |
|---|
| 41 | 43 | noit_http_response_append(ctx, buffer, strlen(buffer)); |
|---|
| 42 | 44 | noit_http_response_flush(ctx, noit_false); |
|---|
| … | … | |
| 44 | 46 | e->mask = EVENTER_TIMER; |
|---|
| 45 | 47 | e->whence.tv_sec += 0; |
|---|
| 46 | | e->whence.tv_usec += 500; |
|---|
| | 48 | e->whence.tv_usec += 500000; |
|---|
| 47 | 49 | e->callback = stratcon_realtime_ticker; |
|---|
| 48 | 50 | e->closure = closure; |
|---|
| … | … | |
| 65 | 67 | } |
|---|
| 66 | 68 | if(!rc->setup) { |
|---|
| 67 | | const char *c = "<html><body>\n"; |
|---|
| | 69 | char c[1024]; |
|---|
| 68 | 70 | noitL(noit_error, "http: %s %s %s\n", |
|---|
| 69 | 71 | req->method_str, req->uri_str, req->protocol_str); |
|---|
| … | … | |
| 73 | 75 | noit_http_response_status_set(ctx, 200, "OK"); |
|---|
| 74 | 76 | noit_http_response_option_set(ctx, NOIT_HTTP_CHUNKED); |
|---|
| 75 | | noit_http_response_option_set(ctx, NOIT_HTTP_DEFLATE); |
|---|
| | 77 | /* noit_http_response_option_set(ctx, NOIT_HTTP_DEFLATE); */ |
|---|
| 76 | 78 | noit_http_response_header_set(ctx, "Content-Type", "text/html"); |
|---|
| | 79 | |
|---|
| | 80 | snprintf(c, sizeof(c), "<html><head><script>document.domain='omniti.com';</script></head><body>\n"); |
|---|
| 77 | 81 | noit_http_response_append(ctx, c, strlen(c)); |
|---|
| | 82 | |
|---|
| | 83 | memset(c, ' ', 1024); |
|---|
| | 84 | noit_http_response_append(ctx, c, sizeof(c)); |
|---|
| 78 | 85 | noit_http_response_flush(ctx, noit_false); |
|---|
| | 86 | |
|---|
| 79 | 87 | stratcon_realtime_ticker(NULL, 0, ctx, NULL); |
|---|
| 80 | 88 | rc->setup = 1; |
|---|