diff --git a/asv_bench/benchmarks/timestamp.py b/asv_bench/benchmarks/timestamp.py index 62abaca17d22f..8c435c435aed3 100644 --- a/asv_bench/benchmarks/timestamp.py +++ b/asv_bench/benchmarks/timestamp.py @@ -1,10 +1,10 @@ +import datetime + from pandas import Timestamp import pytz -import datetime class TimestampConstruction(object): - # TODO: classmethod constructors: fromordinal, fromtimestamp... def time_parse_iso8601_no_tz(self): Timestamp('2017-08-25 08:16:14') @@ -21,6 +21,12 @@ def time_parse_today(self): def time_parse_now(self): Timestamp('now') + def time_fromordinal(self): + Timestamp.fromordinal(730120) + + def time_fromtimestamp(self): + Timestamp.fromtimestamp(1515448538) + class TimestampProperties(object): goal_time = 0.2