Add a "file" function in the js shell

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
8 years ago
8 years ago

People

(Reporter: paul.biggar, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
Created attachment 458837 [details] [diff] [review]
Adds "file" to JS shell

`file` reads the contents of a file to a JS string.

The problem this solves is that reading from disk on linux is noisy (2-3%), and its making it difficult to tell if patches have any effect on the benchmark run-time. File allows separating reading from disk with evaling the code.

The patch isn't ready for landing (see call to fread), but it's good enough to test this.
Benchmarks solve this problem by running a preliminary, unrecorded test to "pretty much ensure" that the requisite files are in cache for future runs. Is there any benchmark you specifically have in mind that requires re-reading from disk?

Alternate idea: create a RAMdisk; run benchmarks from there.
We already have snarf, no need for another workalike.

/be
(Reporter)

Comment 3

8 years ago
(In reply to comment #2)
> We already have snarf, no need for another workalike.

Indeedy, I missed that.


(In reply to comment #1)
> Benchmarks solve this problem by running a preliminary, unrecorded test to
> "pretty much ensure" that the requisite files are in cache for future runs. Is
> there any benchmark you specifically have in mind that requires re-reading from
> disk?

No, I'm just getting very noisy benchmark results; sayre suggested disk io has an effect on linux.

> Alternate idea: create a RAMdisk; run benchmarks from there.

Great idea, will try that.
Status: NEW → UNCONFIRMED
Ever confirmed: false
(Reporter)

Comment 4

8 years ago
See bug 580532 for more attempts to reduce variability.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.