Displaying 4 results from an estimated 4 matches for "addcount".
Did you mean:
account
2008 Dec 05
1
page views counter
Hi all,
I''ve made a really simple page views counter.
def show
@post = Post.find......
addcount = @post.views += 1
@post.update_attribute "views", addcount
end
Its working fine, but if someone hold the F5 key, it keeps counting and
counting. Which is not a really good. Is there a way how to force the
counter to not keep counting while someone is holding the F5 key?
THX P.
--
Po...
2017 Jun 30
2
llvm-profdata determinism
...in case of conflicts, the function
> content hash.
>
Ah, so you mean the loop in InstrProfRecordWriterTrait::EmitData that
inserts into the SummaryBuilder - the SummaryBuilder itself doesn't depend
on the order of 'addRecord' calls - ah, I see, addRecord -> addEntryCount
-> addCount -> CountFrequencies, a std::map (thus, ordered by value,
independent of call order of addRecord).
But inside that loop, it also starts writing directly to 'Out' based on the
order of the SmallDenseMap, doesn't it? I don't immediately see anywhere
that seeks within 'Out'...
2017 Jun 30
0
llvm-profdata determinism
...on
>> content hash.
>>
>
> Ah, so you mean the loop in InstrProfRecordWriterTrait::EmitData that
> inserts into the SummaryBuilder - the SummaryBuilder itself doesn't depend
> on the order of 'addRecord' calls - ah, I see, addRecord -> addEntryCount
> -> addCount -> CountFrequencies, a std::map (thus, ordered by value,
> independent of call order of addRecord).
>
> But inside that loop, it also starts writing directly to 'Out' based on
> the order of the SmallDenseMap, doesn't it? I don't immediately see
> anywhere that see...
2017 Jun 30
2
llvm-profdata determinism
I haven't tested it, but it looks to me like llvm-profdata merge (well,
InstrProfWriter specifically) would not have deterministic output.
Certainly the textual output iterates over FunctionData which is a
StringMap of SmallDenseMaps, neither of which has deterministic iteration.
The binary writing looks like it'd have similar issues - looping through
these unordered maps & writing