  The multi-messenger joint observations of GW170817 and GRB170817A shed new
light on the study of short-duration gamma-ray bursts (SGRBs). Not only did it
substantiate the assumption that SGRBs originate from binary neutron star (BNS)
mergers, but it also confirms that the jet generated by this type of merger
must be structured, hence the observed energy of an SGRB depends on the viewing
angle from the observer. However, the precise structure of the jet is still
subject to debate. Moreover, whether a single unified jet model can be applied
to all SGRBs is not known. Another uncertainty is the delay timescale of BNS
mergers with respect to star formation history of the Universe. In this paper,
we conduct a global test of both delay and jet models of BNS mergers across a
wide parameter space with simulated SGRBs. We compare the simulated peak flux,
redshift and luminosity distributions with the observed ones and test the
goodness-of-fit for a set of models and parameter combinations. Our simulations
suggest that GW170817/GRB 170817A and all SGRBs can be understood within the
framework of a universal structured jet viewed at different viewing angles.
Furthermore, models invoking a jet plus cocoon structure with a lognormal delay
timescale is most favored. Some other combinations (e.g. a Gaussian delay with
a power-law jet model) are also acceptable. However, the Gaussian delay with
Gaussian jet model and the entire set of power-law delay models are disfavored.
