summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-06-17 17:47:25 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-12 23:16:31 -0400
commit540eb1eef0aba8bd10b7ebb3dc56cdb9e480164f (patch)
tree7828470058aa0b677333fb23e332f6f75642b349 /tools/perf/scripts/python/export-to-postgresql.py
parent0da21c4417ce8fac70bb46dd58c3a63f64bad76c (diff)
scsi: libfc: fix seconds_since_last_reset calculation
The fc_get_host_stats() function contains a complex conversion from jiffies to timespec to seconds. As we try to get rid of uses of struct timespec, we can clean this up and replace it with a simpler computation. Simply dividing the difference in jiffies by HZ is not only much more efficient, it also avoids a problem that causes the seconds_since_last_reset value to be incorrect if jiffies has overrun since the 'boot_time' value was recorded. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions