diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-20 22:52:57 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-20 22:52:57 -0400 |
commit | a6f1d32121b7ce8b4cb9485f238eb62f23b75c7e (patch) | |
tree | 5fba20ea0ee790ac3b9373a237856c89bf4f9152 /gpsd.c | |
parent | e9034a445991b1fdceb6d536f5415b320c049e6a (diff) | |
download | gpsd-a6f1d32121b7ce8b4cb9485f238eb62f23b75c7e.tar.gz |
Remove the old latency-profiling machinery.
It hasn't actually worked since we switched protocols to JSON. This diff
puts the framework in place for new machinery using timing attributes in the
TPV sentence.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -1226,7 +1226,7 @@ static void handle_request(struct subscriber_t *sub, for (devp = devices; devp < devices + MAXDEVICES; devp++) { if (allocated_device(devp) && subscribed(sub, devp)) { if ((devp->observed & GPS_TYPEMASK) != 0) { - json_tpv_dump(&devp->gpsdata, + json_tpv_dump(&devp->gpsdata, &sub->policy, reply + strlen(reply), replylen - strlen(reply)); rstrip(reply); @@ -1633,23 +1633,6 @@ static void consume_packets(struct gps_device_t *device) if (buf[0] != '\0') (void)throttled_write(sub, buf, strlen(buf)); -#ifdef TIMING_ENABLE - if (buf[0] != '\0' && sub->policy.timing) { - (void)snprintf(buf, sizeof(buf), - "{\"class\":\"TIMING\"," - "\"tag\":\"%s\",\"len\":%d," - "\"xmit\":%lf,\"recv\":%lf," - "\"decode\":%lf," - "\"emit\":%lf}\r\n", - device->gpsdata.tag, - (int)device->packet.outbuflen, - device->d_xmit_time, - device->d_recv_time, - device->d_decode_time, - timestamp()); - (void)throttled_write(sub, buf, strlen(buf)); - } -#endif /* TIMING_ENABLE */ } } } |