Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[leo_gateway] Replace erlang:now with os:timestamp #360

Closed
mocchira opened this issue May 1, 2015 · 3 comments
Closed

[leo_gateway] Replace erlang:now with os:timestamp #360

mocchira opened this issue May 1, 2015 · 3 comments

Comments

@mocchira
Copy link
Member

mocchira commented May 1, 2015

Need less to say, erlang:now is slow.

[kanno@leofs11 leofs]$ find deps/leo_* -type f|xargs grep erlang:now
deps/leo_gateway/src/leo_gateway_rpc_handler.erl:    {_,_,NowPart} = erlang:now(),

We will fix the above part.

@mocchira mocchira self-assigned this May 1, 2015
@mocchira mocchira added this to the 1.2.9 milestone May 1, 2015
@yosukehara
Copy link
Member

I've found 4 lines as below:

%% leo_gateway:
leo_gateway/src/leo_gateway_rpc_handler.erl:223:    {_,_,NowPart} = erlang:now(),

%% leo_logger:
leo_logger/src/leo_logger_appender_file.erl:52:    {{Y, M, D}, {H, _, _}} = calendar:now_to_local_time(now()),
leo_logger/src/leo_logger_server.erl:300:    {{Y, M, D}, {H, _, _}} = calendar:now_to_local_time(now()),
leo_logger/src/leo_logger_server.erl:320:    {{Y, M, D}, {H, _, _}} = calendar:now_to_local_time(now()),

@mocchira
Copy link
Member Author

mocchira commented May 1, 2015

@yosukehara thx!

@mocchira
Copy link
Member Author

mocchira commented May 1, 2015

Fixed with below two commits.
leo-project/leo_gateway@5f4d1cb
leo-project/leo_logger@9e7a30d

@mocchira mocchira closed this as completed May 1, 2015
yosukehara added a commit to leo-project/elarm that referenced this issue May 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants