Skip to content

Commit

Permalink
Able to handle over 32bit values in leo-gateway's snmpa
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Nov 29, 2012
1 parent 7121546 commit 5f1fdc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/leo_s3_http_cache_statistics.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ handle_call({sync, ?STAT_INTERVAL_1M}) ->
#stats{gets = NumOfRead,
hits = HitCount,
records = NumOfObjects,
cached_size = TotalOfSize} = Stats,
cached_size = TotalOfSize0} = Stats,
TotalOfSize1 = erlang:round(TotalOfSize0 / (1024*1024)),

catch snmp_generic:variable_set(?SNMP_CACHE_HIT_COUNT, HitCount),
catch snmp_generic:variable_set(?SNMP_CACHE_MISS_COUNT, NumOfRead - HitCount),
catch snmp_generic:variable_set(?SNMP_CACHE_NUM_OF_OBJ, NumOfObjects),
catch snmp_generic:variable_set(?SNMP_CACHE_TOTAL_SIZE, TotalOfSize),
catch snmp_generic:variable_set(?SNMP_CACHE_TOTAL_SIZE, TotalOfSize1),
ok;

handle_call({sync, ?STAT_INTERVAL_5M}) ->
Expand Down

0 comments on commit 5f1fdc6

Please sign in to comment.