lib/eco/api/microcases/people_load.rb in eco-helpers-2.0.16 vs lib/eco/api/microcases/people_load.rb in eco-helpers-2.0.17
- old
+ new
@@ -32,12 +32,12 @@
when modifier.include?(:api)
logger.info("Going to get all the people via API")
start = Time.now
session.batch.get_people.tap do |people|
- secs = Time.now - start
+ secs = (Time.now - start).round(3)
cnt = people.count
- per_sec = (cnt.to_f / secs).floor
+ per_sec = (cnt.to_f / secs).round(2)
logger.info("Loaded #{cnt} people in #{secs} seconds (#{per_sec} people/sec)")
if modifier.include?(:save) && people && people.length > 0
file = file_manager.save_json(people, filename, :timestamp)
logger.info("#{people.length } people saved to file #{file}.")