Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 881a8c3

Browse files
committed
Merge pull request #205 from jmoses/master
Replace instances of `timestamp` with `time` for v0.9 release
2 parents f12063c + e62ce77 commit 881a8c3

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Here's a basic example (for more see the examples directory)::
103103
"host": "server01",
104104
"region": "us-west"
105105
},
106-
"timestamp": "2009-11-10T23:00:00Z",
106+
"time": "2009-11-10T23:00:00Z",
107107
"fields": {
108108
"value": 0.64
109109
}

examples/tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def main(host='localhost', port=8086):
1717
"host": "server01",
1818
"region": "us-west"
1919
},
20-
"timestamp": "2009-11-10T23:00:00Z",
20+
"time": "2009-11-10T23:00:00Z",
2121
"fields": {
2222
"value": 0.64
2323
}

examples/tutorial_server_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def main(host='localhost', port=8086, nb_day=15):
2828
hostName = "server-%d" % random.randint(1, 5)
2929
# pointValues = [int(past_date.strftime('%s')), value, hostName]
3030
pointValues = {
31-
"timestamp": int(past_date.strftime('%s')),
31+
"time": int(past_date.strftime('%s')),
3232
"measurement": metric,
3333
'fields': {
3434
'value': value,

examples/tutorial_sine_wave.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def main(host='localhost', port=8086):
2323

2424
point = {
2525
"measurement": 'foobar',
26-
"timestamp": int(now.strftime('%s')) + angle,
26+
"time": int(now.strftime('%s')) + angle,
2727
"fields": {
2828
"value": y
2929
}

tests/influxdb/client_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def setUp(self):
8888
"host": "server01",
8989
"region": "us-west"
9090
},
91-
"timestamp": "2009-11-10T23:00:00Z",
91+
"time": "2009-11-10T23:00:00Z",
9292
"fields": {
9393
"value": 0.64
9494
}
@@ -149,7 +149,7 @@ def test_write(self):
149149
"points": [{"measurement": "cpu_load_short",
150150
"tags": {"host": "server01",
151151
"region": "us-west"},
152-
"timestamp": "2009-11-10T23:00:00Z",
152+
"time": "2009-11-10T23:00:00Z",
153153
"fields": {"value": 0.64}}]}
154154
)
155155

@@ -160,7 +160,7 @@ def test_write(self):
160160
"points": [{"measurement": "cpu_load_short",
161161
"tags": {"host": "server01",
162162
"region": "us-west"},
163-
"timestamp": "2009-11-10T23:00:00Z",
163+
"time": "2009-11-10T23:00:00Z",
164164
"fields": {"value": 0.64}}]}
165165
)
166166

@@ -212,18 +212,18 @@ def test_write_points_toplevel_attributes(self):
212212
def test_write_points_batch(self):
213213
dummy_points = [
214214
{"measurement": "cpu_usage", "tags": {"unit": "percent"},
215-
"timestamp": "2009-11-10T23:00:00Z", "fields": {"value": 12.34}},
215+
"time": "2009-11-10T23:00:00Z", "fields": {"value": 12.34}},
216216
{"measurement": "network", "tags": {"direction": "in"},
217-
"timestamp": "2009-11-10T23:00:00Z", "fields": {"value": 123.00}},
217+
"time": "2009-11-10T23:00:00Z", "fields": {"value": 123.00}},
218218
{"measurement": "network", "tags": {"direction": "out"},
219-
"timestamp": "2009-11-10T23:00:00Z", "fields": {"value": 12.00}}
219+
"time": "2009-11-10T23:00:00Z", "fields": {"value": 12.00}}
220220
]
221221
expected_last_body = {"tags": {"host": "server01",
222222
"region": "us-west"},
223223
"database": "db",
224224
"points": [{"measurement": "network",
225225
"tags": {"direction": "out"},
226-
"timestamp": "2009-11-10T23:00:00Z",
226+
"time": "2009-11-10T23:00:00Z",
227227
"fields": {"value": 12.00}}]}
228228
with requests_mock.Mocker() as m:
229229
m.register_uri(requests_mock.POST,

0 commit comments

Comments
 (0)